-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi all,
I've build a grid that shows a list of possible items to add in a order and in front of each item is a doublebox which corresponds to the quantity of that item, I'd like to let the user choose all the quantities of all items he wants and when he click on Add All button I get the quantity values to update the model's list item.
The zul:
<grid id="grdCores" fixedLayout="true" mold="paging" pageSize="7"> <columns> <column label="Item Name" width="55px"/> <column label="Quantity" width="90px"/> </columns> </grid>
The composer:
public static final grdCoresRowRenderer = new GridAddCoresRowRenderer(); public void afterCompose() { grdCores.setRowRenderer(grdCoresRowRenderer) } public void onClick_btnCarregarEstoque(Event event) { // get the data from database grdCores.setModel(new SimpleListModel(list)) }
And the renderer:
public class GridAddCoresRowRenderer implements RowRenderer { public void render(Row row, Object estoque) throws Exception { new Label(estoque.toString).setParent(row); new Doublebox(0).setParent(row); } }
How could I get the data that user enter for each item?
Regards,
Felipe Cypriano
I found that I can annotate a manually created component doing this:
Listbox listbox = new Listbox(); listbox.addAnnotation("some", null);
How could I use it to do data binding? Is it possible?
IMO, this ZK Annotation page is a little confuse I couldn't understand how and why use annotations (I know that data binding use annotations in zul file just it).
Asked: 2009-06-12 13:24:11 +0800
Seen: 388 times
Last updated: Jun 15 '09