com.liferay.taglib.faces.converter
Class PhoneNumberConverter
java.lang.Object
com.liferay.taglib.faces.converter.PhoneNumberConverter
- All Implemented Interfaces:
- javax.faces.component.StateHolder, javax.faces.convert.Converter
public class PhoneNumberConverter
- extends Object
- implements javax.faces.convert.Converter, javax.faces.component.StateHolder
This class is a JSF converter that can be used to convert phone numbers.
Since phone numbers in the United States of America always have 10 digits,
this converter provides automatic conversion of 10 digit phone numbers to a
desired format. The format is specified by the unitedStatesFormat component
attribute.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PhoneNumberConverter
public PhoneNumberConverter()
isTransient
public boolean isTransient()
- Specified by:
isTransient
in interface javax.faces.component.StateHolder
setTransient
public void setTransient(boolean value)
- Specified by:
setTransient
in interface javax.faces.component.StateHolder
getUnitedStatesFormat
public String getUnitedStatesFormat()
setUnitedStatesFormat
public void setUnitedStatesFormat(String unitedStatesFormat)
getAsObject
public Object getAsObject(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent,
String value)
- Specified by:
getAsObject
in interface javax.faces.convert.Converter
getAsString
public String getAsString(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent,
Object value)
throws javax.faces.convert.ConverterException
- Specified by:
getAsString
in interface javax.faces.convert.Converter
- Throws:
javax.faces.convert.ConverterException
restoreState
public void restoreState(javax.faces.context.FacesContext facesContext,
Object obj)
- Specified by:
restoreState
in interface javax.faces.component.StateHolder
saveState
public Object saveState(javax.faces.context.FacesContext facesContext)
- Specified by:
saveState
in interface javax.faces.component.StateHolder