I think, therefore I blog

Percentages with JSF NumberConverter

By , 3 July 2009

Percentages with JSF NumberConverter

Hooray for buggy javadocs. The JSF taglib describes the type attribute of an f:numberConverter as:

Specifies how the number string will be formatted and parsed. Valid values are "number", "currency", and "percentage".

Nice, but wrong. For percentages, the correct value is percent, as defined in the JSF spec.

<f:convertNumber type="percent"/>

Where do I apply for my refund on that hour of my life?

Percentages with JSF NumberConverter

About Roger Keays

Percentages with JSF NumberConverter

Roger Keays is an artist, an engineer, and a student of life. Since he left Australia in 2009, he has been living as a digital nomad in over 40 different countries around the world. Roger is addicted to surfing. His other interests are music, psychology, languages, and finding good food. Click here to subscribe to his weekly blog, or stalk him on Facebook and Twitter.

Leave a Comment

Please visit https://RogerKeays.com/blog/percentages-with-jsf-numberconverter to add your comments.

Join Over 1000 Subscribers

I write every Sunday about travel, psychology, and technology. Thousands of people just like you have already subscribed—and for good reason. It'll change your life. And it's free :)

Read a Good Book

“A spellbinding true story of love, passion and adventure. One can’t help but be swept away by 100% Love Guaranteed.” —Dr Tammie Matson, author of Elephant Dance.

Chat For A While

Your Vote Matters

Which animal will take over when humans go extinct?