org.apache.shale.util
Class ConverterHelper

java.lang.Object
  extended by org.apache.shale.util.ConverterHelper

public class ConverterHelper
extends Object

Helper class to provide access to by-type JavaServer Faces Converter capabilities. This implementation is stateless and maintains no cached information, so instances may be freely created and destroyed with no side effects.

$Id: ConverterHelper.java 464373 2006-10-16 04:21:54Z rahul $

Since:
1.0.1

Constructor Summary
ConverterHelper()
           
 
Method Summary
 Object asObject(javax.faces.context.FacesContext context, Class type, String value)
          Use the registered by-type Converter to convert the specified String value to a corresponding Object value.
 String asString(javax.faces.context.FacesContext context, Class type, Object value)
          Use the registered by-type Converter to convert the specified Object value to a corresponding String value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConverterHelper

public ConverterHelper()
Method Detail

asObject

public Object asObject(javax.faces.context.FacesContext context,
                       Class type,
                       String value)

Use the registered by-type Converter to convert the specified String value to a corresponding Object value.

Parameters:
context - FacesContext for the current request
type - Type to which this value should be converted (used to select the appropriate by-type converter)
value - Value to be converted
Throws:
javax.faces.convert.ConverterException - if a conversion error occurs

asString

public String asString(javax.faces.context.FacesContext context,
                       Class type,
                       Object value)

Use the registered by-type Converter to convert the specified Object value to a corresponding String value.

Parameters:
context - FacesContext for the current request
type - Type from which this value should be converted (used to select the appropriate by-type converter)
value - Value to be converted
Throws:
javax.faces.convert.ConverterException - if a conversion error occurs


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.