ZK Developer's Guide
ZK Developer's Guide
ZK Developer's Guide
- TAGS
- guide
- iknow.seforge.org
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Getting Started with <strong>ZK</strong><br />
Are there some predefined Dialogs?<br />
Each UI framework offers some predefined Dialogs, and <strong>ZK</strong> is no<br />
exception. We used the org.zkoss.zul.Messagebox in the "Hello<br />
World" example through the globally defined alert method.<br />
Beyond the mentioned Messagebox, the next important predefined<br />
dialog is the org.zkoss.zul.Fileupload. With this dialog, it's<br />
possible to do an HTTP Upload.<br />
Beyond the usage of the standard components such as window, textbox, and button<br />
it's possible to create components for a particular page. For that purpose there exists<br />
the component element.<br />
With the style attribute of a component, it is possible to change the visual<br />
appearance of a component. You have the possibility to define the style each time.<br />
For example:<br />
<br />
However, if you want to use that button more than once, you can define<br />
a component.<br />
For example:<br />
<br />
Now you can use this component as follows:<br />
<br />
<br />
It's possible to override the definitions of the predefined components:<br />
<br />
<br />
<br />
Molds<br />
A mold is an attribute that is used to customize pages in <strong>ZK</strong>. The org.zkoss.zk.ui.<br />
Component interface has the setMold method. If there isn't a mold defined; the mold<br />
with the name default is used.<br />
Some components come with more than the default mold. For example, groupbox<br />
(represented by the class org.zkoss.zul.Groupbox) has the default and 3d molds.<br />
[ 30 ]