public class ZipCodeConverter extends AbstractStateHolder implements javax.faces.convert.Converter, Serializable
ZipCodeOfCountry.| Constructor and Description |
|---|
ZipCodeConverter() |
| Modifier and Type | Method and Description |
|---|---|
Object |
getAsObject(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent component,
String zipCode)
Adds mask characters to the supplied zipCode.
|
String |
getAsString(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent component,
Object zipCode)
Removes mask characters from the supplied zipCode.
|
Iso3166Country |
getCountry()
Gets the country of this ZipCodeConverter.
|
void |
restoreState(javax.faces.context.FacesContext facesContext,
Object state)
Restores the state saved by
saveState(FacesContext). |
Object |
saveState(javax.faces.context.FacesContext facesContext)
Saves the state of this converter.
|
void |
setCountry(Iso3166Country country)
Sets the country for this ZipCodeConverter.
|
isTransient, setTransientpublic Iso3166Country getCountry()
public void setCountry(Iso3166Country country)
country - The country for this ZipCodeConverter.public Object getAsObject(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component, String zipCode)
getAsObject in interface javax.faces.convert.ConverterfacesContext - Faces Context.component - The UI component that stores the zip code.zipCode - The zip code to add the mask characters to.SpecialMaskConverter.getAsObject(FacesContext, UIComponent, String)public String getAsString(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component, Object zipCode)
getAsString in interface javax.faces.convert.ConverterfacesContext - Faces Context.component - The UI component that stores the zip code.zipCode - The zip code to remove the mask characters from.GenericMaskConverter.getAsString(FacesContext, UIComponent, Object)public Object saveState(javax.faces.context.FacesContext facesContext)
saveState in interface javax.faces.component.StateHolderfacesContext - The FacesContext.public void restoreState(javax.faces.context.FacesContext facesContext,
Object state)
saveState(FacesContext).restoreState in interface javax.faces.component.StateHolderfacesContext - The FacesContext.state - The state saved by saveState(FacesContext).Copyright © 2008–2018. All rights reserved.