struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "vamsi" <vamseemand...@gmail.com>
Subject Re: How format a string when it is Displayed?
Date Thu, 30 Aug 2007 04:52:54 GMT
I think we can't format a String using bean:write
previously I searched for this but I didn't found any solution as it is not 
supporting any formatting for
Strings.
----- Original Message ----- 
From: <sriharsha.chevuru@wachovia.com>
To: <user@struts.apache.org>
Sent: Wednesday, August 29, 2007 11:35 PM
Subject: How format a string when it is Displayed?


> Hi,
>
> I need help in formatting a String, when it is displayed.
>
> Here is what i am doing:
>
> <bean:write name="someObject" property="exampleSSN"/>
>
> It is stored asa continous unformatted String an hence displayed as
> 'XXXXXXXXX'. Now, I want my social security number to be displayed as
> (XXX) - XX - XXXX.
>
> How can i acheive this in Struts, without actually using my own custom Tag
> libraries which do this formatting for me. If somebody can throw some
> pointers, it woould help the cause.
>
>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message