-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi, I'm new to ZK. I need to create 2 listbox. 1 that is fill by a DB and the other that is fill by the user by selecting rows of the first one. How can I do this? Here is my source code:
<window id="commande" title="Liste des commandes" apply="l4t.User.UserCommandes" border="normal"> <listbox id="commandeslb" rows="5" model="@{commandeCtrl.model}" selectedItem="@{commandeCtrl.selected}"> <listhead sizable="true"> <listheader width="80px" label="DevisID" /> <listheader label="Cours" /> <listheader width="100px" label="Date début" /> <listheader width="100px" label="Date fin" /> <listheader width="150px" label="Prix" /> </listhead> <listitem self="@{each=commande}"> <listcell label="@{commande.idDevis}" /> <listcell label="@{commande.cours}" /> <listcell label="@{commande.datedeb}" /> <listcell label="@{commande.datefin}" /> <listcell label="@{commande.prix}" /> </listitem> </listbox> <button label="Add Selection" id="add" /> <button label="Remove Selection" id="del" /> <button label="Add all" id="alladd" /> <button label="Remove all" id="alldel" /> <listbox id="panierlb" rows="5"> <listhead sizable="true"> <listheader width="80px" label="DevisID" /> <listheader label="Cours" /> <listheader width="100px" label="Date début" /> <listheader width="100px" label="Date fin" /> <listheader width="150px" label="Prix" /> </listhead> <listitem self="@{each=commande}"> <listcell label="@{commande.idDevis}" /> <listcell label="@{commande.cours}" /> <listcell label="@{commande.datedeb}" /> <listcell label="@{commande.datefin}" /> <listcell label="@{commande.prix}" /> </listitem> </listbox> </window>
The first list is correctly set. But I don't know how to deal with a second List. Do I have to create another class? Do I have to use 2 models?
Thank you for your help.
Check the Zk explorer (http://www.zkoss.org/zkdemo/userguide/#l3)
Asked: 2009-12-10 04:38:22 +0800
Seen: 471 times
Last updated: Dec 10 '09