public class CodeDescriptionConverter extends Object implements javax.faces.convert.Converter, Serializable
CodeDescription
.
Constructor and Description |
---|
CodeDescriptionConverter() |
Modifier and Type | Method and Description |
---|---|
Object |
getAsObject(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent,
String code)
Converts the supplied code to an object of type
CodeDescription . |
String |
getAsString(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent component,
Object codeDescription)
Converts the supplied codeDescription to a String.
|
public Object getAsObject(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent, String code)
CodeDescription
.
getAsObject
in interface javax.faces.convert.Converter
facesContext
- Faces Context.uiComponent
- The UI component that stores the CodeDescription and the nested UISelectItems.code
- The String representation of the code of the CodeDescription to lookup.javax.faces.convert.ConverterException
- When the supplied uiComponent is not of type:
UISelectOne, or when no CodeDescription has the supplied code.public String getAsString(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component, Object codeDescription)
getAsString
in interface javax.faces.convert.Converter
facesContext
- Faces Context.component
- The UI component that stores the codeDescription.codeDescription
- The CodeDescription to convert to a String.CodeDescription
.Copyright © 2008–2018. All rights reserved.