public class GenreTypeConverter extends Object implements javax.faces.convert.Converter
GenreType enum.
Converts between GenreType enum values and their
corresponding human-friendly String representation.
Example:
GenreType.TALE ↔ "Tale"GenreType.SHORT_STORY ↔ "Short Story"
This converter is automatically applied to all GenreType properties
in JSF views due to the FacesConverter.forClass() annotation.
| Constructor and Description |
|---|
GenreTypeConverter() |
| Modifier and Type | Method and Description |
|---|---|
Object |
getAsObject(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
String value)
Converts a String value from the JSF view into a
GenreType enum. |
String |
getAsString(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
Object value)
Converts a
GenreType enum into a human-friendly String
representation for JSF views. |
public Object getAsObject(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, String value)
GenreType enum.getAsObject in interface javax.faces.convert.Convertercontext - the JSF FacesContextcomponent - the UI component associated with this conversionvalue - the string value from the JSF viewGenreType enum, or null if emptypublic String getAsString(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, Object value)
GenreType enum into a human-friendly String
representation for JSF views.getAsString in interface javax.faces.convert.Convertercontext - the JSF FacesContextcomponent - the UI component associated with this conversionvalue - the GenreType enum value to convertvalue is nullCopyright © 2025. All rights reserved.