how to call js function from vm

asked 2013-02-19 19:31:45 +0800

maradolla gravatar image maradolla

I need to call one js function in view when vm updated some variable. actual problem is i tried to bind that variable to zk label component, but there is no event is firing when the value of label is changing.

delete flag offensive retag edit

4 Answers

Sort by ยป oldest newest most voted

answered 2013-02-21 12:02:49 +0800

psingh gravatar image psingh flag of India
963 8

updated 2013-02-21 12:03:33 +0800

If you want to call js function from your view model class then you have to write below code: In view model class:


in zul file


            function f_test(){ 
link publish delete flag offensive edit

answered 2013-02-20 05:02:27 +0800

sjoshi gravatar image sjoshi flag of India
3493 1 8

See This may be it will help you to resolve your issue

link publish delete flag offensive edit

answered 2013-02-20 10:06:35 +0800

hswain gravatar image hswain flag of India
1763 3 10

in jul file

<button label="Click" xmlns:w="http://www.zkoss.org/2005/zk/client" w:onClick="demo();"></button>

or Java Code

button.setWidgetListener(Events.ON_CLICK, "demo();");
link publish delete flag offensive edit
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

1 follower



Asked: 2013-02-19 19:31:45 +0800

Seen: 88 times

Last updated: Jan 22 '14

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