org.apache.myfaces.custom.convertStringUtils
Class StringUtilsConverter

java.lang.Object
  extended by org.apache.myfaces.custom.convertStringUtils.StringUtilsConverter
All Implemented Interfaces:
javax.faces.component.StateHolder, javax.faces.convert.Converter

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

Provides runtime modification of a string. Uses Apache Lang StringUtils and WordUtils to peform operations.

Example:

Author:
Julian Ray

Field Summary
protected  boolean _transient
           
protected  java.lang.Boolean appendEllipsesDuringInput
           
protected  java.lang.Boolean appendEllipsesDuringOutput
           
static java.lang.String CONVERTER_ID
           
protected  java.lang.String format
           
protected  java.lang.Integer maxLength
           
protected  java.lang.Boolean trim
           
 
Constructor Summary
StringUtilsConverter()
           
 
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)
           
 java.lang.String getFormat()
           
 java.lang.Integer getMaxLength()
           
 java.lang.Boolean getTrim()
           
 java.lang.Boolean isAppendEllipsesDuringInput()
           
 java.lang.Boolean isAppendEllipsesDuringOutput()
           
 boolean isTransient()
           
 void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
           
 java.lang.Object saveState(javax.faces.context.FacesContext context)
           
 void setAppendEllipsesDuringInput(java.lang.Boolean appendEllipsesDuringInput)
           
 void setAppendEllipsesDuringOutput(java.lang.Boolean appendEllipsesDuringOutput)
           
 void setFormat(java.lang.String format)
           
 void setMaxLength(java.lang.Integer maxLength)
           
 void setTransient(boolean _transient)
           
 void setTrim(java.lang.Boolean trim)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONVERTER_ID

public static final java.lang.String CONVERTER_ID

_transient

protected boolean _transient

format

protected java.lang.String format

trim

protected java.lang.Boolean trim

maxLength

protected java.lang.Integer maxLength

appendEllipsesDuringOutput

protected java.lang.Boolean appendEllipsesDuringOutput

appendEllipsesDuringInput

protected java.lang.Boolean appendEllipsesDuringInput
Constructor Detail

StringUtilsConverter

public StringUtilsConverter()
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

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

isTransient

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

setTransient

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

getFormat

public java.lang.String getFormat()

setFormat

public void setFormat(java.lang.String format)

getMaxLength

public java.lang.Integer getMaxLength()

setMaxLength

public void setMaxLength(java.lang.Integer maxLength)

isAppendEllipsesDuringOutput

public java.lang.Boolean isAppendEllipsesDuringOutput()

setAppendEllipsesDuringOutput

public void setAppendEllipsesDuringOutput(java.lang.Boolean appendEllipsesDuringOutput)

isAppendEllipsesDuringInput

public java.lang.Boolean isAppendEllipsesDuringInput()

setAppendEllipsesDuringInput

public void setAppendEllipsesDuringInput(java.lang.Boolean appendEllipsesDuringInput)

getTrim

public java.lang.Boolean getTrim()

setTrim

public void setTrim(java.lang.Boolean trim)


Copyright © 2009. All Rights Reserved.