0

Allows "," and "." characters in decimal Box

asked 2013-12-11 16:54:09 +0800

Cisnake gravatar image Cisnake
0

Hi , Depends local, Decimal box allows use "." or ",". If the local is FR only "." is allowed. if the local is EN both "." and "," are allowed.

It is possible to allow "." and "," int the both local(FR and EN) ?

delete flag offensive retag edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2013-12-12 01:41:37 +0800

vincentjian gravatar image vincentjian
2245 6

Hi

You can override getAllowKeys_ method, for example

<zk>
    <script><![CDATA[
    zk.afterLoad('zul.inp', function() {
        var _decimalbox = {};
        zk.override(zul.inp.Decimalbox.prototype, _decimalbox, {
            getAllowedKeys_: function() {
                var symbols = this._localizedSymbols;
                return this.$supers('getAllowedKeys_', arguments)
                    + (symbols ? symbols: zk).DECIMAL + (symbols ? symbols: zk).GROUPING;
            }
        });
    });
    ]]></script>
    <decimalbox />
</zk>
link publish delete flag offensive edit
0

answered 2013-12-16 14:48:56 +0800

Cisnake gravatar image Cisnake
0

Thanks,

but when I add the code I get: Cause: Child not allowed in org.zkoss.zul.Decimalbox

link publish delete flag offensive edit

Comments

Can you post your sample?

vincentjian ( 2013-12-17 01:21:33 +0800 )edit
Your answer
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
2 followers

RSS

Stats

Asked: 2013-12-11 16:54:09 +0800

Seen: 10 times

Last updated: Dec 16 '13

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