Adverts

There is no converter for boolean values in the standard JSF libraries which isn't entirly surprising since there are so many ways of displaying a boolean value such as true and false, yes and no or even 1 and 0. Save for perhaps the last one these values will need internationalizing if they are going to appear on a page. My initial thought about how to internationalize this simplest of fields was to write a converter but then a thought occured to me I can use a little bit of EL (Expression Language) to choose a string to display. This really simple solution is shown below:

This works and is a very quick solution only requiring entries in the message bundle which you would be loading anyway to internationalize the rest of the page. When I get chance I will write a converter for booleans and make it available, until then enjoy this rare bit of simplicity.

Adverts

Donate and Help

Please support this site and
Bandwidth doesn't grow on trees y' know :o)

Adverts

Get Adsense