-
FEATURED COMPONENTS
First time here? Check out the FAQ!
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.
If you want to call js function from your view model class then you have to write below code: In view model class:
Clients.evalJavaScript("f_test();");
in zul file
<script>
function f_test(){
alert("Test");
}
</script>
try it:
Here's demo :http://zkframeworkhint.blogspot.in/2013/07/how-to-call-javascript-function-from.html
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();");
See This may be it will help you to resolve your issue
Asked: 2013-02-19 19:31:45 +0800
Seen: 90 times
Last updated: Jan 22 '14