Revision history [back]

click to hide/show revision 1
initial version

asked 2016-12-08 15:50:28 +0800

yennor gravatar image yennor

zk8 client side binding to a viewmodel command seems not to work

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.

zk8 client side binding to a viewmodel command seems not to work

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.

click to hide/show revision 3
cleared the question a bit up

zk8 client side binding to a viewmodel command seems not to work

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.

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