Tim,

That is what I have right now...and is ofcourse very simple to do it in FormBeans :). But I have to do this at a number of places/form beans, so I was wondering if it could be done using bean:message as I mentioned in the subject of this e-mail (not necessarily bean:write).

Thanks!


[EMAIL PROTECTED] wrote:


Yup, formatKey is pretty handy. We use it to format dates. But <bean:write> tag seems to do this only when converting from non-String data type to String datatype. What I have is a String '123456789'. One solution is to probably convert this to Integer and that will force it to use a number formatter.



You've hit the nail on the head! You're trying to edit a string, while the bean:write formatter (and, for that matter, the JSTL <fmt:formatNumber...> and <fmt:formatDate...> tags )translate from something else to a string.

The easy way out here is to just write a getter in your FormBean that
returns the SSN string with the appropriate punctuation inserted.

--
Tim Slattery
[EMAIL PROTECTED]


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to