Join GitHub today
Percent converter ignoring % character. #387
JSF built in number converter requires a percentage number input including % character, which is just annoying for users to input the % sign.
I extended the built-in NumberConverter for this purpose. I was not sure if the % sign for all locales is the suffix. If yes the % could just be appended which makes this code even smaller.
What do you think?
Prefix missing Zero
I also allowed input of
This not only covers percent formats but also currency formats.
Only prefixing with zero wasn't necessary in my case. It works just fine for me in Java 1.8 (Oracle JDK 1.8.0_111).
Thanks for improving OmniFaces with this suggestion!