Get all Browser and Client Info from a ZK session

It is important to capture certain client information, such as browser, locale, ip-address and others as part of logging or auditing. I need to do this in a controller and was curious what I can retrieve from ZK. The information you can find here and there in the ZK docs. Here I summarized all essential objects and methods in one simple app.

ZKSessionInfo Web App

Continue reading

Creating a ZK Groovy Console

SECURITY WARNING: Please take note of the warning at the end of the tutorial !
UPDATE 2011-07-08: A good article on the security concern I recommend http://www.jroller.com/melix/entry/customizing_groovy_compilation_process

We use the Groovy Script Engine to run small Groovy scripts to prepare incoming interface messages for further processing. Here I share with you how to embed the engine into a ZK page. Very basic, though it shows you the concept and it is wasy to expand to your needs.

ZK Groovy Console

Continue reading

Getting started with ZK and Netbeans

In my ongoing evaluation of various web frontend frameworks, I stumbled upon the ZK Open Source Ajax (among others like IceFaces, JMaki/Dojo/Comet, JSF Controls). Even ZK appears a bit more on the Eclipse side it can easily be used in Netbans. In order to get the ZK implanted in our favorite IDE, you need to download the plugin from Sourceforge (link). Please note the startsite on ZK (SF) highlights the current version 2.0.3 from March 2009, but clicking on the download link on the right points you to the old version, so you better select the browse packages link.

Link to ZK Website
Link to SF REM 2.0.3 Plugin

Start Netbeans and open the Tools/Plugins/Downloaded and add the downloaded plugin (with the usual agree and confirm unsigned plugin dialog.

bv2009031911350016

REM 2.0.3 NB plugin

That’s it ! Welcome to ZK in Netbeans.

Start a new web project and select the ZK 360 option.

ZK360 Project

ZK360 Project

You will find a project skeleton with an initial index.zul file

ZK Project Skeleton

ZK Project Skeleton

Start the application and it gets deployed to Glassfish (or you choice of AS). So far I have no problems running it on Glassfish V2 and V3 prelude.

I run through the evaluator tutorial with ease (link).
Stay tuned for more hands-on with Netbeans and ZK.