org.apache.myfaces.custom.convertString
Class TrimConverter

java.lang.Object
  extended by org.apache.myfaces.custom.convertString.TrimConverter
All Implemented Interfaces:
javax.faces.convert.Converter

public class TrimConverter
extends java.lang.Object
implements javax.faces.convert.Converter

Useful when a char(5) field ends up rendered as "abc " .

Author:
Dennis Byrne

Constructor Summary
TrimConverter()
           
 
Method Summary
 java.lang.Object getAsObject(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.String value)
           
 java.lang.String getAsString(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TrimConverter

public TrimConverter()
Method Detail

getAsObject

public java.lang.Object getAsObject(javax.faces.context.FacesContext context,
                                    javax.faces.component.UIComponent component,
                                    java.lang.String value)
                             throws javax.faces.convert.ConverterException
Specified by:
getAsObject in interface javax.faces.convert.Converter
Throws:
javax.faces.convert.ConverterException

getAsString

public java.lang.String getAsString(javax.faces.context.FacesContext context,
                                    javax.faces.component.UIComponent component,
                                    java.lang.Object value)
                             throws javax.faces.convert.ConverterException
Specified by:
getAsString in interface javax.faces.convert.Converter
Throws:
javax.faces.convert.ConverterException


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.