23.12.2012 Views

ZK Developer's Guide

ZK Developer's Guide

ZK Developer's Guide

SHOW MORE
SHOW LESS

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

After this small example, we will make a second example with an input element<br />

inside. This application consists of one main screen. This screen has a label (Insert<br />

your name), an input field, and a hidden button (Say Hello). The following<br />

screenshot shows the screen.<br />

The definition of this screen is done in a single file. Its name is helloworld.zul. Both<br />

the layout and logic is done in that page. The page is realized with the previously<br />

mentioned <strong>ZK</strong> User Interface Markup Language.<br />

Now it's time to draw the curtain and show the implementation of this simple<br />

application as follows:<br />

<br />

<br />

<br />

<br />

<br />

<br />

0 && event.getValue().trim()<br />

.length() > 0)<br />

{<br />

buttonToSayHello.setVisible(true);<br />

}<br />

else<br />

{<br />

buttonToSayHello.setVisible(false);<br />

}<br />

]]><br />

<br />

<br />

<br />

<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!