Documentation
Project Documentation
Foundation

Description

Converter which modifies a string by changing the input text into upper case, lower case, capitalized. The input string can be optionally trimmed and truncated at some max length. Ellipses (...) can be added to a truncated string.

Screen Shot

Not Available

API

component-family Converter
component-class org.apache.myfaces.custom.convertStringUtils.StringConverter
tag-class org.apache.myfaces.custom.convertStringUtils.StringConverterTag

Usage

            	<h:outputText value="#{backingBean.customer.name}">
 					<s:convertStringUtils format="capitalize" trim="true"/>
 				</h:outputText>
            	<h:outputText value="#{backingBean.customer.description}">
 					<s:convertStringUtils trim="true" maxLength="64" appendEllipsesDuringOutput="true"/>
 				</h:outputText>
            	<h:inputText value="#{backingBean.customer.stateCode}">
 					<s:convertStringUtils format="uppercase" />
 				</h:inputText>
 				
            

Syntax

<s:convertStringUtils/>

format - (optional) one of uppercase|lowercase|capitalize.
maxLength - (optional) maximum length of the output string. Strings longer than maxLength will be truncated.
trim - (optional) boolean value (true|false) determining if the string will be trimmed before other operations are applied. Default is false.
appendEllipsesDuringInput - (optional) boolean value (true|false). If true ellipsis (...) will be append to the string if it is truncated. Default is false.
appendEllipsesDuringOutput - (optional) boolean value (true|false). If true ellipsis (...) will be append to the string if it is truncated. Default is false.

Additional Information

See the convertStringUtils.jsp for an example.