org.apache.myfaces.html5.renderkit.util
Class RendererUtils

java.lang.Object
  extended by org.apache.myfaces.html5.renderkit.util.RendererUtils

public class RendererUtils
extends Object

Author:
Ali Ok

Constructor Summary
RendererUtils()
           
 
Method Summary
static void checkParamValidity(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent, Class compClass)
           
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 findUIOutputConverterFailSafe(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent)
          Finds the converter of the component in a safe way.
static String getConvertedStringValue(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, javax.faces.convert.Converter converter, Object value)
          Convenient utility method that returns the currently given value as String, using the given converter.
static Object getConvertedUIOutputValue(javax.faces.context.FacesContext facesContext, javax.faces.component.UIOutput output, Object submittedValue)
           
static String getStringValue(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component)
           
static boolean isDefaultAttributeValue(Object value)
          See JSF Spec.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RendererUtils

public RendererUtils()
Method Detail

checkParamValidity

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

getConvertedStringValue

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


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.

Returns:
the Converter or null if no Converter specified or needed
Throws:
javax.faces.FacesException - if the Converter could not be created

findUIOutputConverterFailSafe

public static javax.faces.convert.Converter findUIOutputConverterFailSafe(javax.faces.context.FacesContext facesContext,
                                                                          javax.faces.component.UIComponent uiComponent)
Finds the converter of the component in a safe way.

Returns:
null if no converter found or an exception occured inside

isDefaultAttributeValue

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

Parameters:
value -
Returns:
boolean

getStringValue

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

getConvertedUIOutputValue

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


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.