-
FEATURED COMPONENTS
First time here? Check out the FAQ!
![]() | 1 | initial version | |
I'm using zk ce 8.0.2.2. I tried for a few hours to get the client side binding to a command in a viewmodel to work. I tried it out in several different ways in the zul file, at the end just in the java script debbuging console of chromium. I loaded an example to zkfiddle. I tried in several different ways to get it working, but I just needed to chose an example that would work in the fiddle.
http://zkfiddle.org/sample/3lsdr7g/4-zk-client-side-command-binding-test
when you click on the first normal zk button, the command gets called and the label changes its value.
When you click on the second button, which is a html button, with an onclick event, where the command should be called. just nothing happens. not even an error message or anything. When I try to do it in the debugging console the command seems to work (no error message or anything), but the command at the server side never gets called.
Could anybody tell me what I'm doing wrong. For me it looks like I'm doing exactly the same as shown in the examples in the documentation.
![]() | 2 | No.2 Revision |
I'm using zk ce 8.0.2.2. I tried for a few hours to get the client side binding to a command in a viewmodel to work. I tried it out in several different ways in the zul file, at the end just in the java script debbuging console of chromium. I loaded an example to zkfiddle. I tried in several different ways to get it working, but I just needed to chose an example that would work in the fiddle.
http://zkfiddle.org/sample/3lsdr7g/4-zk-client-side-command-binding-testhttp://zkfiddle.org/sample/3lsdr7g/5-zk-client-side-command-binding-test
when you click on the first normal zk button, the command gets called and the label changes its value.
When you click on the second button, which is a html button, with an onclick event, where the command should be called. just nothing happens. not even an error message or anything. When I try to do it in the debugging console the command seems to work (no error message or anything), but the command at the server side never gets called.
Could anybody tell me what I'm doing wrong. For me it looks like I'm doing exactly the same as shown in the examples in the documentation.
![]() | 3 | cleared the question a bit up |
I'm using zk ce 8.0.2.2. I tried for a few hours to get the client side binding to a command in a viewmodel to work. I tried it out in several different ways in the zul file, at the end just in the java script debbuging console of chromium. I loaded an example to zkfiddle. I tried in several different ways to get it working, but I just needed to chose an example that would work in the fiddle.
http://zkfiddle.org/sample/3lsdr7g/5-zk-client-side-command-binding-test
when you click on the first normal zk button, the command gets called and the label changes its value.
When you click on the second button, which is a html button, with an onclick event, where the command should be called.
zkbind.$('$label').command('testcommand', {test: 'argh'});
But just nothing happens. not even an error message or anything. When I try to do it in the debugging console the command seems to work (no error message or anything), but the command at the server side never gets called.
Could anybody tell me what I'm doing wrong. For me it looks like I'm doing exactly the same as shown in the examples in the documentation.