Converter implementation for
java.lang.Enum (and enum primitive) values.
| Modifier and Type | Field and Description |
|---|---|
| public static final String | CONVERTER_ID
The standard converter id for this converter. |
| public static final String | ENUM_ID
The message identifier of the |
| public static final String | ENUM_NO_CLASS_ID
The message identifier of the |
| private boolean | |
| private boolean | |
| private Class |
| Access | Constructor and Description |
|---|---|
| public | |
| public | EnumConverter(Class<T>
Class where the enum constants are taken from by the converter methods. targetClass)Instantiates an enum converter with a class where enum constants are taken from. |
| Modifier and Type | Method and Description |
|---|---|
| public void | clearInitialState()
Implements jakarta. Reset the PartialStateHolder to a non-delta tracking state. |
| public Object | getAsObject(FacesContext
the context, UIComponent FacesContext for this request.the component, String UIComponent to which this value will be applied.the String value)value to be converted to Object.Implements jakarta.
Convert the |
| public String | getAsString(FacesContext
FacesContext for the request being processedUIComponent with which this model object value is associatedModel object value to be converted (may be value)null)Implements jakarta.
Convert the enum constant given by the |
| public boolean | initialStateMarked()
Implements jakarta.
Return |
| public boolean | isTransient()
Implements jakarta. If true, the Object implementing this interface must not participate in state saving or restoring. |
| public void | markInitialState()
Implements jakarta.
The runtime must ensure that the |
| public void | restoreState(FacesContext
the Faces context. facesContext, Object the state. object)Implements jakarta. Perform any processing required to restore the state from the entries in the state Object. |
| public Object | saveState(FacesContext
the Faces context. facesContext)Implements jakarta.
Gets the state of the instance as a |
| public void | setTransient(boolean
boolean pass b)true if this Object will
not participate in state saving or restoring, otherwise pass false.Implements jakarta. Denotes whether or not the Object implementing this interface must or must not participate in state saving or restoring. |
| CONVERTER_ID | back to summary |
|---|---|
| public static final String CONVERTER_ID The standard converter id for this converter. | |
| ENUM_ID | back to summary |
|---|---|
| public static final String ENUM_ID
The message identifier of the
| |
| ENUM_NO_CLASS_ID | back to summary |
|---|---|
| public static final String ENUM_NO_CLASS_ID
The message identifier of the
| |
| initialState | back to summary |
|---|---|
| private boolean initialState | |
| isTransient | back to summary |
|---|---|
| private boolean isTransient | |
| targetClass | back to summary |
|---|---|
| private Class<? extends Enum<E extends Enum<E>>> targetClass | |
| EnumConverter | back to summary |
|---|---|
| public EnumConverter() For StateHolder | |
| EnumConverter | back to summary |
|---|---|
| public EnumConverter(Class<T> targetClass) Instantiates an enum converter with a class where enum constants are taken from.
| |
| clearInitialState | back to summary |
|---|---|
| public void clearInitialState() Implements jakarta. Doc from jakarta. Reset the PartialStateHolder to a non-delta tracking state.
| |
| getAsObject | back to summary |
|---|---|
| public Object getAsObject(FacesContext context, UIComponent component, String value) Implements jakarta.
Convert the
| |
| getAsString | back to summary |
|---|---|
| public String getAsString(FacesContext context, UIComponent component, Object value) Implements jakarta.
Convert the enum constant given by the
| |
| initialStateMarked | back to summary |
|---|---|
| public boolean initialStateMarked() Implements jakarta. Doc from jakarta.
Return
| |
| isTransient | back to summary |
|---|---|
| public boolean isTransient() Implements jakarta. Doc from jakarta. If true, the Object implementing this interface must not participate in state saving or restoring.
| |
| markInitialState | back to summary |
|---|---|
| public void markInitialState() Implements jakarta. Doc from jakarta.
The runtime must ensure that the
| |
| restoreState | back to summary |
|---|---|
| public void restoreState(FacesContext facesContext, Object object) Implements jakarta. Doc from jakarta. Perform any processing required to restore the state from the entries in the state Object.
If the class that implements this interface has references to instances that also implement StateHolder (such as a
If the
| |
| saveState | back to summary |
|---|---|
| public Object saveState(FacesContext facesContext) Implements jakarta. Doc from jakarta.
Gets the state of the instance as a
If the class that implements this interface has references to instances that implement StateHolder (such as a
This method must not alter the state of the implementing object. In other words, after executing this code:
The return from this method must be
| |
| setTransient | back to summary |
|---|---|
| public void setTransient(boolean b) Implements jakarta. Doc from jakarta. Denotes whether or not the Object implementing this interface must or must not participate in state saving or restoring.
| |