Search code examples
javazk

ZK LOCALE DecimalBox conversion


Help.

When I use the decimalBox of ZK and the user's Locale is IT the decimal point gets converted to a comma and this confuses my calculation. How can i stop the conversion please?

I am using ZK 6.5.7


Solution

  • There are several solution for that.

    You can set the Locale for your Webapp to EN like here.

    You can define a "format" attribute for your Decimalbox.

    Or you can do it in a simple event handler in ZUL like in that forum:

    action="onkeyup:#{self}.value = #{self}.value.replace('.',',');"