Showing posts with label JS. Show all posts
Showing posts with label JS. Show all posts

Thursday, November 7, 2013

How to call Simple javascript function in ZK ?

Lots of time developer have a issue how we can call a simple Java Script function in ZK framework .Let Us suppose we have a JavaScript function doSomething() now we have to call this function on some event ,let us suppose below code.

1-Declare below line in your ZUL(Top of the page)
2-Here i called a JavaScript function on Window onClose event

3-Write below JavaScript


Tuesday, July 30, 2013

How to call JavaScript Function from ViewModel(Java Class) in ZK

Today i will tell you how we can call Java Script function from view model of that particular zul , Let us suppose you have A.zul file something like this ...


Now you will want to call closeBrowser() method from your ViewModel I mean from MyViewModel.java class, So you have to write below code in your viewModel or Java class inside any method



Note:- I did not test the code but some of my team member already done this thing show i took help from them to write this blog entry and it will work because it is working in our application.

Thursday, April 4, 2013

How to Call Java Script Function from ViewModel Class in ZK Framework?

Few day i have some scenario i have to call a JS function (which is in inside my ZUL file) from ViewModel or Java class of same page
I have used below code in ViewModel class
And in your zul page you have this JS function...