Monday, April 29, 2013

How to call Groovy Script method and pass parameter from Java class

You can follow below code to achieve above task.

and groovy script file code is

How to call Groovy Script from Java Class.

As i am working on ZK framework ,but as per requirement i have to use groovy as well in my project so in my previous post Integrate Groovy with Zk Framework i already mentioned how can we do it .Today i will want to share how we can call Groovy script from inside Java class..Try below code

As i am using Maven project so i put my groovy script file UserSelectedComponents.groovy inside /src/main/resources folder

Sunday, April 21, 2013

ZK Framework add a backgorund image in ZUL page

Let us suppose you want to add a background image in the ZUl page then you have to use below style in your zul page

ZK Framework Never Session Timeout of application

How can we manage the session time out issue in ZK as per ZK official documentation we have to add below line of code in ZK.xml file

For detail information you can check the official documentation Session_Timeout_Management in ZK Framework

Friday, April 19, 2013

ZK Detach a ModalWindow WIthout Wiring

As its a long time pending feature by ZK Team but i got workaround to close a modal window on button press you can use below code for this you have to create a button in your modal window and in that button you have to call a method like this
ZUl code

And Java Code for this

How to Hide Toobar in ZK CKEditor

If you want to hide the Toolbar of Zk CkEditor Component you have to write below code in your JS file...This code will be inside a file assuming name ckconfig.js
And in your ZK Ck Editor Component you have to write like this..

How to Integrate Groovy with ZK Web application.

s i m using Maven in my ZK Web application ..So i have to made these changes to run GroovyScript from my ZK WebApplication..
1- First i have to add this dependency in pom.xml file
2- Second thing i have to create a Groovy script file and added it into /src/main/resources folder.With Following Code.
3- Third and most important thing how to run above created Groovy Script code..as you know the above code returning List of String so we can use below code in my Java class.
This is Basic POC(Proof of Concept) and my first sample with Groovy...and Here Sample Code for Groovy Script..

Tuesday, April 9, 2013

How to Disable Border of Groupbox in ZK?

If you want to disable border of ZK Groupbox Just try below content style..

Thursday, April 4, 2013

How Can Start with ZK Chosenbox(Demo code)?

As i was working on ZK ChosenBox Component . i Got plenty of issue which can be resolve with the help of @Bai-Ben zk teamdevelopers ... Why we are zk ChosenBox?
Previously i am using Zk Combobox component for showing list of items but i will want to give flexibility to user to select more than one item so i just got that ZK have a new component Zk Chosenbox which can full fill my requirements .. How Can we implement the ZK Chosenbox...
Here is the ZUL file
And here is the Java code..

You can check this example ZK Fiddle example for Chosenbox in ZK fiddle as well but Note you need Zk version 6.5.2

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...

ZK Delay in Tootip

Add below line of code in zk.xml file