Top Description Fields Constructors Methods
com.sun.faces.application

public Class PropertyEditorHelper

extends Object
Class Inheritance
Imports
javax.faces.FacesException, javax.faces.application.Application, .FacesMessage, javax.faces.component.UIComponent, .UIInput, javax.faces.context.FacesContext, javax.faces.convert.Converter, .ConverterException, com.sun.faces.util.MessageFactory, .RequestStateManager

Helper class to aid the ConverterPropertyEditorBase in converting properties.
Author
Mike Youngstrom

Field Summary

Modifier and TypeField and Description
private Application

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
addConversionErrorMessage(FacesContext context, UIComponent component, ConverterException ce)

Add a conversion error message in the case of a PropertyEditor based conversion error.

public Object
convertToObject(Class<?> targetClass, String textValue)

Convert the textValue to an object of type targetClass by delegating to a converter.

public String
convertToString(Class<?> targetClass, Object value)

Convert an object of type targetClass to text by delegating to a converter obtained from the Faces application.

protected UIComponent

Returns:

the current component, or null.
getComponent
()

Return the javax.faces.component.UIComponent that is currently being processed.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

appback to summary
private Application app

Constructor Detail

PropertyEditorHelperback to summary
public PropertyEditorHelper(Application app)

Method Detail

addConversionErrorMessageback to summary
protected void addConversionErrorMessage(FacesContext context, UIComponent component, ConverterException ce)

Add a conversion error message in the case of a PropertyEditor based conversion error.

convertToObjectback to summary
public Object convertToObject(Class<?> targetClass, String textValue)

Convert the textValue to an object of type targetClass by delegating to a converter.

convertToStringback to summary
public String convertToString(Class<?> targetClass, Object value)

Convert an object of type targetClass to text by delegating to a converter obtained from the Faces application.

getComponentback to summary
protected UIComponent getComponent()

Return the javax.faces.component.UIComponent that is currently being processed.

Returns:UIComponent

the current component, or null.