<zk xmlns="http://www.zkoss.org/2005/zul"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.zkoss.org/2005/zul http://www.zkoss.org/2005/zul/zul.xsd">
<?page id="simplePage" title="Simple ZK Application"?>
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="simpleWindow"?>
<window id="simpleWindow" apply="com.ebpm.webdemo.zk.SimpleComposer6" border="normal"
width="800px" height="500px" title="Persons - Composer Example">
<grid id="input">
<rows>
<row>* Lastname: <textbox id="lastname" value="@{controller.PersonBean.lastname}" constraint="no empty" width="300px" /></row>
<row>* Firstname: <textbox id="firstname" value="@{controller.PersonBean.firstname}" constraint="no empty" width="300px"/></row>
<row> Address: <textbox id="address" value="@{controller.PersonBean.address}" width="300px"/></row>
<row> Account: <decimalbox id="account" value="@{controller.PersonBean.account}" width="50px"/></row>
<row> Birthdate: <datebox id="birthdate" value="@{controller.PersonBean.birthdate}" format="dd.MM.yyyy"/></row>
<row spans="2">
<hbox>
What is your favorite color?:
<combobox id="color" value="@{controller.PersonBean.color}">
<comboitem label="Red" description="Red means Red ;-)" value="r1"/>
<comboitem label="Green" value="g2"/>
<comboitem label="Blue" value="b2"/>
</combobox>
</hbox>
</row>
<row spans="2">
<hbox>
<checkbox id="married" checked="@{controller.PersonBean.married}" label="Are you married?"/>
</hbox>
</row>
<row spans="2">
<groupbox>
<caption label="How much do you like yourself?:"/>
<radiogroup id="rating" selectedItem="@{controller.PersonBean.rating}">
<radio value="1" label="Actually, I hate me."/>
<radio value="2" label="Not so much."/>
<radio value="3" label="I'm indifferent."/>
<radio value="4" label="I'm pretty neat."/>
<radio value="5" label="I'm totally in love with me."/>
</radiogroup>
</groupbox>
</row>
</rows>
</grid>
<separator/>
<button id="submit" label="Submit"/><button id="cancel" label="Cancel"/>
<separator/>
<listbox id="personsList" model="@{controller.allPersons}">
<listhead sizable="true">
<listheader label="First Name"/>
<listheader label="Last Name"/>
<listheader label="Address"/>
<listheader label="Account"/>
<listheader label="Birthdate"/>
<listheader label="Color"/>
<listheader label="Married"/>
<listheader label="Rating"/>
</listhead>
<listitem self="@{each=person}">
<listcell label="@{person.firstname}" />
<listcell label="@{person.lastname}" />
<listcell label="@{person.address}" />
<listcell label="@{person.account, converter='org.zkforge.converters.ColorNumberCustom'}">
<custom-attributes format="###,##0.00"/></listcell>
<listcell label="@{person.birthdate, converter='org.zkforge.converters.DateUser'}"/>
<listcell label="@{person.color}" />
<listcell label="@{person.married, converter='org.zkforge.converters.BooleanImage'}"/>
<listcell label="@{person.rating}" />
</listitem>
</listbox>
</window>
</zk>