0

combobox id set in MVVM page

asked 2016-07-27 11:19:54 +0800

afxgroup gravatar image afxgroup
126 2

Hello i have a strange problem. I'm using this code:

<combobox id="@load('cboU'.concat(each.id))"

to assign an id to each combobox i have in the grid and then i have a js function that is called on rowChanged

zk.afterMount(function() {
var binder = zkbind.$('$grid');
binder.after('rowChanged', function (e) {
    zAu.send(new zk.Event(zk.Widget.$("$cboU" + e.articolo.id), "onUser", null));
});

});

All works ok if id is <70 so cboU1 to cboU69. From cboU70 the zk.Widget.$("$cboU" + e.articolo.id) returns null and so the "onUser" event is not called. What's wrong?

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-07-27 15:33:08 +0800

afxgroup gravatar image afxgroup
126 2

there is something strange with deferred loading. Try to load a large grid and add in a combobox instant=true. you will get an error in zul.inp.wpd here:

          function d(m) {
                var l = this.getInputNode()
                  , n = this.valueEnter_ || l.value;

l == undefined

and another strange thing is that if i click on the combobox and then i call

zAu.send(new zk.Event(zk.Widget.$("$cboU" + e.articolo.id), "onUser", null));

the widget is found. So is there a way to force the loading of all client elements?

link publish delete flag offensive 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
1 follower

RSS

Stats

Asked: 2016-07-27 11:19:54 +0800

Seen: 22 times

Last updated: Jul 27 '16

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