ZK Framework Tutorials
Frameworks
ZK FrameworkZK-Framework - Setting up Eclipse to Develop with ZK
Read from beginning of Sample Chapter 2 - Online Media Library
ZK-Framework - Online Media Library
Setting up Eclipse to Develop with ZK
We use version 3.3 of Eclipse, which is also known as Europa release. You can download the IDE from http://"www.eclipse.org/downloads/" target="_blank" rel="nofollow". We recommend using the version "Eclipse IDE for Java EE Developers".
First we have to make a file association for the .zul files. For that open the Preferences dialog with Window | Preferences. After that do the following steps:
- Type Content Types into the search dialog.
- Select Content Types in the tree.
- Select XML in the tree.
- Click Add and type *.zul.
- See the result.
The steps are illustrated in the picture below:

With these steps, we have syntax highlighting of our files. However, to have content assist, we have to take care about the creation of new files. The easiest way is to set up Eclipse to work with zul.xsd.
For that open the Preferences dialog with Window | Preferences. After that do the following steps:
- Type XML Catalog into the search dialog.
- Select XML Catalog in the tree.
- Press Add and fill out the dialog (see the second dialog below).
- See the result.


Now we can easily create new ZUL files with the following steps:
1. File | New | Other, and select XML:

2. Type in the name of the file (for example hello.zul).
3. Press Next.
4. Choose Create XML file from an XML schema file:

5. Press Next.
6. Select Select XML Catalog entry.
7. Now select zul.xsd:

8. Now select the Root Element of the page (e.g. window).

9. Select Finish.
Now you have a new ZUL file with content assist. Go into the generated attribute element and press Alt+Space.

Read More from Sample Chapter 2 - Online Media Library
ZK-Framework - Setting up a New Project
ZK-Framework - Ceating the Pages
Sponsored Links
