0

Problem with Decimalbox

asked 2011-12-29 00:49:41 +0800

GuzZpaWn gravatar image GuzZpaWn
111 2

Hi, I'm using ZK 5.09 CE and i have this problem with a decimalbox control. I write this 1,050.12 but when I use getValue from control (decimalbox) it becomes 1.05012. How can i solve this? thanx.

delete flag offensive retag edit

5 Replies

Sort by ยป oldest newest

answered 2011-12-29 22:36:42 +0800

Matze2 gravatar image Matze2
773 7

updated 2011-12-29 22:38:12 +0800

Your browser language is probably setup to some region where comma (",") is the decimal point.
In my area, this input is unusual but according to the spec it makes sense.

If you have tomcat, you can check your locale using

<label value="${desktop.execution.nativeRequest.locale}" />

link publish delete flag offensive edit

answered 2011-12-30 01:17:33 +0800

SimonPai gravatar image SimonPai
1696 1

It looks like a bug which has been fixed in the upcoming 5.0.10:
ZK-629

Regards,
Simon

link publish delete flag offensive edit

answered 2012-04-15 01:36:45 +0800

fernsx gravatar image fernsx
6

I have just download version 5.0.11 and I test decimalbox, I work in locale spanish and when I enter a 23.3 and when "onBlur" the number change to 233
In fact page zkdemo (http://www.zkoss.org/zkdemo/input/form_sample) I detected the same problem in decimalbox

link publish delete flag offensive edit

answered 2012-04-15 08:28:46 +0800

Matze2 gravatar image Matze2
773 7

I don't see your point. In Spanish, "." is a grouping character (usually for thousands).
In other words, it has no meaning for the number. Thus, the result "233" is correct.
What you can do to limit the confusion is to disable the grouping character for decimal box with a global or local setting.
Then you can only enter the decimal point character, in your case ",".

link publish delete flag offensive edit

answered 2012-04-16 14:25:35 +0800

fernsx gravatar image fernsx
6

Ok, Thanks

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2011-12-29 00:49:41 +0800

Seen: 269 times

Last updated: Apr 16 '12

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More