Hi

I have a collection of objects, each one contains a boolean flag, and I'm
displaying these via a JSP as a list via an interator. Struts is converting
the boolean fields into the strings "true" and "false", I'd like to be able
to 

1) display them as "Y" and "N"
2) convert back to "true" and "false" when the list is returned
3) and do it via annotation if possible.

Having read http://struts.apache.org/2.0.11.1/docs/type-conversion.html it
looks that a custom TypeConvertor is the way to proceed.

Is it possible to create a TypeConvertor that extends the existing Boolean
convertor to return "Y","N" instead of "true", "false"? Where do I find the
convertor or is it a "built-in" function? Is it possible to do the override
via annotation so that I can execute the override where I need it and
default to the standard convertor where I don't.

Regards
-- 
View this message in context: 
http://old.nabble.com/Boolean-Type-Conversion-tp27371490p27371490.html
Sent from the Struts - User mailing list archive at Nabble.com.


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

Reply via email to