public abstract class ConverterPropertyEditorBase
extends java.beans.PropertyEditorSupport
PropertyEditor
that delegates to a
faces Converter that was registered by-type in a faces-config descriptor.
Concrete implementations (such as generated by
ConverterPropertyEditorFactory
) will override
getTargetClass()
. (This is based on the original
ConverterPropertyEditor code).Modifier and Type | Field and Description |
---|---|
protected static java.util.logging.Logger |
logger |
static java.lang.String |
TARGET_COMPONENT_ATTRIBUTE_NAME |
Constructor and Description |
---|
ConverterPropertyEditorBase() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAsText()
Convert an object of type
getTargetClass() to text by delegating
to a converter obtained from the Faces application. |
protected javax.faces.component.UIComponent |
getComponent()
Return the
UIComponent that is currently
being processed, so it can be passed on to the
Converter . |
protected abstract java.lang.Class<?> |
getTargetClass()
Return the target class of the objects that are being edited.
|
void |
setAsText(java.lang.String textValue)
Convert the
textValue to an object of type
getTargetClass() by delegating to a converter obtained from the
Faces application. |
protected static final java.util.logging.Logger logger
public static final java.lang.String TARGET_COMPONENT_ATTRIBUTE_NAME
protected abstract java.lang.Class<?> getTargetClass()
Converter
from the Faces application.protected javax.faces.component.UIComponent getComponent()
UIComponent
that is currently
being processed, so it can be passed on to the
Converter
. (Most basic converters use this
for creating and setting error messages, although they may also use
attributes of the component to customize the conversion). For now, do
this by looking for a request attribute keyed on
TARGET_COMPONENT_ATTRIBUTE_NAME
.public void setAsText(java.lang.String textValue) throws java.lang.IllegalArgumentException
textValue
to an object of type
getTargetClass()
by delegating to a converter obtained from the
Faces application.setAsText
in interface java.beans.PropertyEditor
setAsText
in class java.beans.PropertyEditorSupport
java.lang.IllegalArgumentException
public java.lang.String getAsText()
getTargetClass()
to text by delegating
to a converter obtained from the Faces application.getAsText
in interface java.beans.PropertyEditor
getAsText
in class java.beans.PropertyEditorSupport
Copyright ? 2002-2006 Sun Microsystems, Inc. All Rights Reserved.