Package com.sun.faces.application
Class PropertyEditorHelper
java.lang.Object
com.sun.faces.application.PropertyEditorHelper
public class PropertyEditorHelper extends Object
Helper class to aid the ConverterPropertyEditorBase in converting properties.
- Author:
- Mike Youngstrom
-
Constructor Summary
Constructors Constructor Description PropertyEditorHelper(Application app)
-
Method Summary
Modifier and Type Method Description protected void
addConversionErrorMessage(FacesContext context, UIComponent component, ConverterException ce)
Add a conversion error message in the case of a PropertyEditor based conversion error.Object
convertToObject(Class<?> targetClass, String textValue)
Convert thetextValue
to an object of type targetClass by delegating to a converter.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
getComponent()
Return theUIComponent
that is currently being processed.
-
Constructor Details
-
Method Details
-
convertToObject
Convert thetextValue
to an object of type targetClass by delegating to a converter. -
convertToString
Convert an object of type targetClass to text by delegating to a converter obtained from the Faces application. -
getComponent
Return theUIComponent
that is currently being processed.- Returns:
- the current component, or null.
-
addConversionErrorMessage
protected void addConversionErrorMessage(FacesContext context, UIComponent component, ConverterException ce)Add a conversion error message in the case of a PropertyEditor based conversion error.- Parameters:
context
-component
-ce
-
-