Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.myfaces.renderkit
Class RendererUtils  view RendererUtils download RendererUtils.java

java.lang.Object
  extended byorg.apache.myfaces.renderkit.RendererUtils

public class RendererUtils
extends java.lang.Object

Version:
$Revision: 290413 $ $Date: 2005-09-20 06:26:13 -0400 (Tue, 20 Sep 2005) $

Field Summary
static java.lang.String EMPTY_STRING
           
private static org.apache.commons.logging.Log log
           
static java.lang.Object NOTHING
           
static java.lang.String SELECT_ITEM_LIST_ATTR
           
 
Constructor Summary
RendererUtils()
           
 
Method Summary
static void checkParamValidity(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent, java.lang.Class compClass)
           
static void copyHtmlInputTextAttributes(javax.faces.component.html.HtmlInputText src, javax.faces.component.html.HtmlInputText dest)
           
static javax.faces.component.UIForm findParentForm(javax.faces.component.UIComponentBase comp)
           
static javax.faces.convert.Converter findUIOutputConverter(javax.faces.context.FacesContext facesContext, javax.faces.component.UIOutput component)
          Find the proper Converter for the given UIOutput component.
static javax.faces.convert.Converter findUISelectManyConverter(javax.faces.context.FacesContext facesContext, javax.faces.component.UISelectMany component)
          Find proper Converter for the entries in the associated List or Array of the given UISelectMany as specified in API Doc of UISelectMany.
static boolean getBooleanAttribute(javax.faces.component.UIComponent component, java.lang.String attrName, boolean defaultValue)
           
static java.lang.Boolean getBooleanValue(javax.faces.component.UIComponent component)
           
static java.lang.String getConcatenatedId(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
           
static java.lang.String getConcatenatedId(javax.faces.context.FacesContext context, javax.faces.component.UIComponent container, java.lang.String clientId)
           
static java.lang.String getConvertedStringValue(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, javax.faces.convert.Converter converter, java.lang.Object value)
          Convenient utility method that returns the currently given value as String, using the given converter.
static java.lang.String getConvertedStringValue(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, javax.faces.convert.Converter converter, javax.faces.model.SelectItem selectItem)
          Convenient utility method that returns the currently given SelectItem value as String, using the given converter.
static java.lang.Object getConvertedUIOutputValue(javax.faces.context.FacesContext facesContext, javax.faces.component.UIOutput output, java.lang.Object submittedValue)
           
static java.lang.Object getConvertedUISelectManyValue(javax.faces.context.FacesContext facesContext, javax.faces.component.UISelectMany selectMany, java.lang.Object submittedValue)
           
static java.util.Date getDateValue(javax.faces.component.UIComponent component)
           
static int getIntegerAttribute(javax.faces.component.UIComponent component, java.lang.String attrName, int defaultValue)
           
static java.lang.Object getObjectValue(javax.faces.component.UIComponent component)
           
static java.lang.String getPathToComponent(javax.faces.component.UIComponent component)
           
private static void getPathToComponent(javax.faces.component.UIComponent component, java.lang.StringBuffer buf)
           
static java.util.Set getSelectedValuesAsSet(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, javax.faces.convert.Converter converter, javax.faces.component.UISelectMany uiSelectMany)
          Convenient utility method that returns the currently selected values of a UISelectMany component as a Set, of which the contains method can then be easily used to determine if a value is currently selected.
static java.util.List getSelectItemList(javax.faces.component.UISelectMany uiSelectMany)
           
static java.util.List getSelectItemList(javax.faces.component.UISelectOne uiSelectOne)
           
static java.lang.String getStringValue(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component)
           
static java.util.Set getSubmittedValuesAsSet(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, javax.faces.convert.Converter converter, javax.faces.component.UISelectMany uiSelectMany)
          Convenient utility method that returns the currently submitted values of a UISelectMany component as a Set, of which the contains method can then be easily used to determine if a select item is currently selected.
private static java.util.List internalGetSelectItemList(javax.faces.component.UIComponent uiComponent)
           
private static java.util.Set internalSubmittedOrSelectedValuesAsSet(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, javax.faces.convert.Converter converter, javax.faces.component.UISelectMany uiSelectMany, java.lang.Object values)
           
static boolean isDefaultAttributeValue(java.lang.Object value)
          See JSF Spec.
static void renderChild(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent child)
           
static void renderChildren(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static final org.apache.commons.logging.Log log

SELECT_ITEM_LIST_ATTR

public static final java.lang.String SELECT_ITEM_LIST_ATTR

EMPTY_STRING

public static final java.lang.String EMPTY_STRING

NOTHING

public static final java.lang.Object NOTHING
Constructor Detail

RendererUtils

public RendererUtils()
Method Detail

getPathToComponent

public static java.lang.String getPathToComponent(javax.faces.component.UIComponent component)

getPathToComponent

private static void getPathToComponent(javax.faces.component.UIComponent component,
                                       java.lang.StringBuffer buf)

getConcatenatedId

public static java.lang.String getConcatenatedId(javax.faces.context.FacesContext context,
                                                 javax.faces.component.UIComponent container,
                                                 java.lang.String clientId)

getConcatenatedId

public static java.lang.String getConcatenatedId(javax.faces.context.FacesContext context,
                                                 javax.faces.component.UIComponent component)

getBooleanValue

public static java.lang.Boolean getBooleanValue(javax.faces.component.UIComponent component)

getDateValue

public static java.util.Date getDateValue(javax.faces.component.UIComponent component)

getObjectValue

public static java.lang.Object getObjectValue(javax.faces.component.UIComponent component)

getStringValue

public static java.lang.String getStringValue(javax.faces.context.FacesContext facesContext,
                                              javax.faces.component.UIComponent component)

isDefaultAttributeValue

public static boolean isDefaultAttributeValue(java.lang.Object value)
See JSF Spec. 8.5 Table 8-1


findUIOutputConverter

public static javax.faces.convert.Converter findUIOutputConverter(javax.faces.context.FacesContext facesContext,
                                                                  javax.faces.component.UIOutput component)
                                                           throws javax.faces.FacesException
Find the proper Converter for the given UIOutput component.


findUISelectManyConverter

public static javax.faces.convert.Converter findUISelectManyConverter(javax.faces.context.FacesContext facesContext,
                                                                      javax.faces.component.UISelectMany component)
Find proper Converter for the entries in the associated List or Array of the given UISelectMany as specified in API Doc of UISelectMany.


checkParamValidity

public static void checkParamValidity(javax.faces.context.FacesContext facesContext,
                                      javax.faces.component.UIComponent uiComponent,
                                      java.lang.Class compClass)

renderChildren

public static void renderChildren(javax.faces.context.FacesContext facesContext,
                                  javax.faces.component.UIComponent component)
                           throws java.io.IOException

renderChild

public static void renderChild(javax.faces.context.FacesContext facesContext,
                               javax.faces.component.UIComponent child)
                        throws java.io.IOException

getSelectItemList

public static java.util.List getSelectItemList(javax.faces.component.UISelectOne uiSelectOne)

getSelectItemList

public static java.util.List getSelectItemList(javax.faces.component.UISelectMany uiSelectMany)

internalGetSelectItemList

private static java.util.List internalGetSelectItemList(javax.faces.component.UIComponent uiComponent)

getSubmittedValuesAsSet

public static java.util.Set getSubmittedValuesAsSet(javax.faces.context.FacesContext context,
                                                    javax.faces.component.UIComponent component,
                                                    javax.faces.convert.Converter converter,
                                                    javax.faces.component.UISelectMany uiSelectMany)
Convenient utility method that returns the currently submitted values of a UISelectMany component as a Set, of which the contains method can then be easily used to determine if a select item is currently selected. Calling the contains method of this Set with the renderable (String converted) item value as argument returns true if this item is selected.


getSelectedValuesAsSet

public static java.util.Set getSelectedValuesAsSet(javax.faces.context.FacesContext context,
                                                   javax.faces.component.UIComponent component,
                                                   javax.faces.convert.Converter converter,
                                                   javax.faces.component.UISelectMany uiSelectMany)
Convenient utility method that returns the currently selected values of a UISelectMany component as a Set, of which the contains method can then be easily used to determine if a value is currently selected. Calling the contains method of this Set with the item value as argument returns true if this item is selected.


getConvertedStringValue

public static java.lang.String getConvertedStringValue(javax.faces.context.FacesContext context,
                                                       javax.faces.component.UIComponent component,
                                                       javax.faces.convert.Converter converter,
                                                       java.lang.Object value)
Convenient utility method that returns the currently given value as String, using the given converter. Especially usefull for dealing with primitive types.


getConvertedStringValue

public static java.lang.String getConvertedStringValue(javax.faces.context.FacesContext context,
                                                       javax.faces.component.UIComponent component,
                                                       javax.faces.convert.Converter converter,
                                                       javax.faces.model.SelectItem selectItem)
Convenient utility method that returns the currently given SelectItem value as String, using the given converter. Especially usefull for dealing with primitive types.


internalSubmittedOrSelectedValuesAsSet

private static java.util.Set internalSubmittedOrSelectedValuesAsSet(javax.faces.context.FacesContext context,
                                                                    javax.faces.component.UIComponent component,
                                                                    javax.faces.convert.Converter converter,
                                                                    javax.faces.component.UISelectMany uiSelectMany,
                                                                    java.lang.Object values)

getConvertedUIOutputValue

public static java.lang.Object getConvertedUIOutputValue(javax.faces.context.FacesContext facesContext,
                                                         javax.faces.component.UIOutput output,
                                                         java.lang.Object submittedValue)
                                                  throws javax.faces.convert.ConverterException

getConvertedUISelectManyValue

public static java.lang.Object getConvertedUISelectManyValue(javax.faces.context.FacesContext facesContext,
                                                             javax.faces.component.UISelectMany selectMany,
                                                             java.lang.Object submittedValue)
                                                      throws javax.faces.convert.ConverterException

getBooleanAttribute

public static boolean getBooleanAttribute(javax.faces.component.UIComponent component,
                                          java.lang.String attrName,
                                          boolean defaultValue)

getIntegerAttribute

public static int getIntegerAttribute(javax.faces.component.UIComponent component,
                                      java.lang.String attrName,
                                      int defaultValue)

findParentForm

public static javax.faces.component.UIForm findParentForm(javax.faces.component.UIComponentBase comp)

copyHtmlInputTextAttributes

public static void copyHtmlInputTextAttributes(javax.faces.component.html.HtmlInputText src,
                                               javax.faces.component.html.HtmlInputText dest)