myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Kienenberger" <mkien...@gmail.com>
Subject Re: General Converter Question
Date Thu, 27 Apr 2006 17:00:58 GMT
On 4/27/06, Julian Ray <julianjray@yahoo.com> wrote:
> If you use something like the BooleanUtils class from commons-lang, much of
> the technical aspects of conversion from strings to boolean values is done
> for you. All you need is a simple converter wrapper and a taglib.
>
> As this is such a common requirement I'm surprised that no one has pushed
> one into the Tomahawk build.

Well, the trick is not to convert from String to Boolean -- it's to
convert back to String afterward.


On 4/27/06, Matthias Wessendorf <matzew@apache.org> wrote:
http://myfaces.apache.org/sandbox/apidocs/org/apache/myfaces/custom/convertboolean/BooleanConverter.html

Yeah!  I'd say that this does what you want.   Note that it has
methods for handling the problem above:

setTrueValue(String)  and setFalseValue(String)

Mime
View raw message