0

Doublebox does not work in zk5

asked 2010-09-21 07:59:59 +0800

cvarona gravatar image cvarona
554 1 6

Hi there,

I've been searching through the forums in order to know what's exactly happening with once trustworthy doubleboxes, with no success so far. Some people complain about the double box gulling up the dot, but my user experience is quite different. Just try the following in the online demo:

<zk><doublebox id="dbox" /><button label="Show content" onClick='alert( "" + dbox.getValue() )' /><zscript>dbox.setValue( 20.3d);</zscript></zk>

The doublebox initially displays the right value. Adding some digit at the end (in the decimal part) will result in the doublebox complaining about an invalid value. Any attempt to use , as decimal part separator (as mandated by my locale) in order to write a different number will fail. Dots remain simply unheeded of (it's not possible to type them, which makes sense for they're not meant to be the decimal part separator in my locale).

Any idea as to what is happening?

With kind regards

César Varona

delete flag offensive retag edit

6 Replies

Sort by » oldest newest

answered 2010-11-08 03:31:55 +0800

cvarona gravatar image cvarona
554 1 6

Hi Todd,

I can't understand what's going on, I'm suddenly unable to reproduce the issue concerning a wrong value ex being raised upon blur :(

I'll let you know if I manage to experience this behaviour again.

Thanx again for your help

César

link publish delete flag offensive edit

answered 2010-11-04 11:52:18 +0800

twiegand gravatar image twiegand
1807 3

César,

Although I didn't try this on the ZK Sandbox, I did run your example on my server switching between both the Hungarian and Spanish locales. I still can't seem to reproduce the issue. Both locales take the comma as the separator and exhibit error messages if I intentionally type in too many of the commas or the wrong number of digits, etc.

One thing to keep in mind for the locales you mention is that you'll probably need to format the number in the displayed message box - otherwise you'll get "20.3" instead of "20,3".

Sorry I couldn't be of more help.

Todd

link publish delete flag offensive edit

answered 2010-11-04 10:23:47 +0800

cvarona gravatar image cvarona
554 1 6

Hi Twiegand,

I'm trying the online zk sandbox; I use the code included in the initial post and try the following:

1) From Firefox 3.6.9 with hungarian locale:

1a) Setting the focus on the doublebox and pressing tab results in a wrong value warning red box being raised ("Legyen szíves beírni egy számot és nem 20,3")
1b) Attempts to type a dot fail (it's not possible to type it, for to the best of my knowledge it's not a valid decimal separator in the target locale)
1c) Attempts to type any number containing a , as decimal separator amount to 1a

2) From Internet Explorer 8 with spanish (ES-es) locale:
2a) Same as 1a
2b) A single dot has the same effect as a single , (it is accepted without any complaint as a valid decimal separator and rather surprisingly transformed into a , which as far as I know is the decimal separator in es-ES locale)
2c) Attempts to type any number containing a , as decimal separator amount to 1c

Thanks for interesting about this

César Varona

link publish delete flag offensive edit

answered 2010-11-04 09:57:44 +0800

twiegand gravatar image twiegand
1807 3

Cvarona,

Which version of ZK are you running? I'm running 5.0.5 and I'm not able to replicate your problem (I tried all kinds of combinations).

Regards,

Todd

link publish delete flag offensive edit

answered 2010-11-04 09:22:21 +0800

cvarona gravatar image cvarona
554 1 6

Hi Murasakiwu,

I'm afraid I can't get the point of all this. My browser has its own locale as default locale, needless to say. That's not the problem I'm talking about. I'm talking about the fact that, for instance, should you try the example above you will notice it suffices to set the focus on the doublebox and press tab in order to make it raise a wrong value exception. Things like this are very strange.

With kind regards

César Varona

link publish delete flag offensive edit

answered 2010-11-02 06:28:50 +0800

murasakiwu gravatar image murasakiwu
81

Dear César:

Please check the language settings of browser, set it be default with your locale language.

Regards

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: 2010-09-21 07:59:59 +0800

Seen: 352 times

Last updated: Nov 08 '10

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