23.12.2012 Views

ZK Developer's Guide

ZK Developer's Guide

ZK Developer's Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Integration with Other Frameworks<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

As you can see, the use attribute of the ZUL page is the link to the<br />

SampleController. The SampleController handles and controls the objects. Let's<br />

have a short look at the SampleController sample code:<br />

public class SampleController extends Window {<br />

private Listbox resultlist;<br />

private Textbox airlinecode;<br />

private Textbox flightnumber;<br />

private Datebox flightdate;<br />

private Button search;<br />

/**<br />

* Initialize the page<br />

*/<br />

public void onCreate() {<br />

// Components<br />

resultlist = (Listbox)<br />

this.getPage().getFellow("query").getFellow("resultlist");<br />

airlinecode = (Textbox)<br />

this.getPage().getFellow("query").getFellow("airlinecode");<br />

flightnumber = (Textbox)<br />

this.getPage().getFellow("query").getFellow("flightnumber");<br />

[ 130 ]

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

Saved successfully!

Ooh no, something went wrong!