<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" ?>
<window id="win" width="600px" height="800px" title="Databind example"
apply="pkg$.DatabindComposer"
xmlns:c="http://www.zkoss.org/2005/zk/client"
contentStyle="overflow:auto"
<listbox id="theList" model="@{persons}"
selectedItem="@{selectedPerson}">
<listhead sizable="true">
<listheader label="Name" width="200px" />
<listheader label="Birth Date" sort="auto" />
<listheader width="80px"/>
<listitem self="@{each=person}">
<textbox value="@{person.name}" inplace="true" />
<datebox value="@{person.birthdate}" inplace="true" width="100px"/>
<attribute name="onClick"><![CDATA[
index = ((Listitem)self.getParent().getParent()).getIndex();
((ListModelList)theList.getModel()).remove(index);
<button id="createJohnny" label="createJohnny"/>
<separator orient="horizontal" height="30px" />
<label value="Updated by direct databind" style="font-weight: bold"/>
<label value="@{selectedPerson.name}" />
<label value="@{selectedPerson.birthdate}" />
<separator orient="horizontal" height="30px" />
<label value="Updated by javascript server-push on select event" style="font-weight: bold"/>
<label id="selectedName" />
<label id="selectedBirthdate" />
<separator orient="horizontal" height="30px" />
<label value="Updated through java on select event" style="font-weight: bold"/>
<label id="selectedNameJ" />
<label id="selectedBirthdateJ" />