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