ZK Studio, An Eclipse Plug-in to Quick start Your ZK Project
Ian Tsai, Engineer, Potix Corporation
Feb. 05, 2008
- ZK Studio 0.5.1 (Eclipse Plug-in)
- Eclipse 3.3.X with WTP platform
- Any ZK you like after Version 2.4
Every time we try to start a new Dynamic Web Project in Eclipse, we always need to do the following routines:
- 1. Find all Jars from ZK_DOWNLOADED_PACKAGE/dist/lib
- 2. Copy all these Jars from "dist/lib", "dist/lib" to "WEB-INF/lib/"
- 3. If your application needs to use ZK in JSP, JSF, copy more Jars to "WEB-INF/lib/"
- 4. Add ZK's settings in web.xml
- 5. Add zk.xml for customized settings
Although these steps are easy to perform, a lazy person like me would ask: "why can't Eclipse handle these for me?". In this article I'll show you how ZK Studio can handle these for you.
The installation of ZK Studio is just like the installation of any other Eclipse plug-in. You put "org.zkoss.eclipse.setting_0.5.0.vxxx.jar" into your eclipse3.3.x like: "ECLIPSE_HOME/plugins" then restart your eclipse.
The demonstration video below shows you how to use this plug-in:
ZK Package Managements in Eclipse Preferenece Dialog
1. In your Eclipse IDE, click toolbar "Window" and select "Preferences...".
2. at preference tree, select "ZK" category then chose "Installed ZKs".
3. Currently there are no installed ZKs, so we need to prepare one. Preparing a ZK package is very simple:
- 1. download ZK's binary distribution from SourceForge.net
- 2. Unpack it as a folder, put it in a proper place like: "C:\ZK\"
- 3. Thats all you need to do.
4. Back to Eclipse IDE's preference dialog. In "Installed ZKs" click "Add..." button and chose the package you prepared.
5. Press "apply", "ok" to quit preference dialog.
Now you can install a ZK package you just added into a 'Dynamic Web Project' after all these settings.
Add ZK while creating Dynamic Web Project
The way to create a new 'Dynamic Web Project' is still the same:
1. In Eclipse IDE, click on 'File', select 'New'->'Project' and chose 'Web'->'Dynamic Web Project' in new project dialog.
2. Then, Eclipse will open a new project wizard, type the project name and press next.
3. In "Project Facets" page, check "ZK WebApp" facet.
4. In "Web Module" page, do your configuration and press "next" button.
5. In "Select Project's ZK Version" page, select the ZK version you want to use in this project.
6. Click on "finish", and Eclipse will generate a new project with ZK inside.
Eclipse Plug-in Require-Bundle
If your environment can't run zk-studio, please make sure these required Bundles are in your eclipse's plugin folder. Actually, if you already installed WTP platform in you eclipse, then zk-studio should operate very well.
Eclipse Web Standard Tools
|Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.|