Implementing Custom Converter Classes
A custom converter class must implement the
javax.faces.converter.Converter interface, which has the
following two methods:
Object getAsObject(FacesContext context, UIComponent component, String newValue)
String getAsString(FacesContext context, UIComponent component, Object value)
- getAsObject: converts a string into an object of the desired
type, throwing a ConverterException if the conversion cannot be
carried out.
- getAsString: converts an object into a string to be displayed in
the client interface.