com.ibm.xsp.converter
Class ConverterImpl

java.lang.Object
  extended by com.ibm.xsp.converter.ConverterImpl
All Implemented Interfaces:
javax.faces.component.StateHolder, javax.faces.convert.Converter

public class ConverterImpl
extends java.lang.Object
implements javax.faces.convert.Converter, javax.faces.component.StateHolder

This corresponds to the xp:converter tag, and acts as a factory and wrapper for converters that are registered in the faces-config.xml files. The converter is created by calling Application.createConverter(java.lang.String).


Constructor Summary
ConverterImpl()
           
 
Method Summary
 java.lang.Object getAsObject(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.String value)
          Converts the value from a String to an Object using the converter registered with the ID getConverterId().
 java.lang.String getAsString(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.Object value)
          Converts the value from an Object to a String using the converter registered with the ID getConverterId().
 java.lang.String getConverterId()
          The converter ID set on this xp:converter object in the XPage source.
 boolean isTransient()
           
 void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
           
 java.lang.Object saveState(javax.faces.context.FacesContext context)
           
 void setConverterId(java.lang.String converterId)
          Identifies the Converter instance to be created and registered.
 void setTransient(boolean state)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConverterImpl

public ConverterImpl()
Method Detail

getAsObject

public java.lang.Object getAsObject(javax.faces.context.FacesContext context,
                                    javax.faces.component.UIComponent component,
                                    java.lang.String value)
Converts the value from a String to an Object using the converter registered with the ID getConverterId().

Specified by:
getAsObject in interface javax.faces.convert.Converter

getAsString

public java.lang.String getAsString(javax.faces.context.FacesContext context,
                                    javax.faces.component.UIComponent component,
                                    java.lang.Object value)
Converts the value from an Object to a String using the converter registered with the ID getConverterId().

Specified by:
getAsString in interface javax.faces.convert.Converter

getConverterId

public java.lang.String getConverterId()
The converter ID set on this xp:converter object in the XPage source. Return the converter ID specified by setConverterId(String).


setConverterId

public void setConverterId(java.lang.String converterId)
Identifies the Converter instance to be created and registered.


isTransient

public boolean isTransient()
Specified by:
isTransient in interface javax.faces.component.StateHolder

setTransient

public void setTransient(boolean state)
Specified by:
setTransient in interface javax.faces.component.StateHolder

restoreState

public void restoreState(javax.faces.context.FacesContext context,
                         java.lang.Object state)
Specified by:
restoreState in interface javax.faces.component.StateHolder

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext context)
Specified by:
saveState in interface javax.faces.component.StateHolder