-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I am just learning about ZK and looking at the Petshop demo, catalog.zul,I do not understand how $(categories} is resolved to a value. I think it's using the getCategories() method of CatalogFacade but I don't see how/where that is specified. Any help would be much appreciated. Here's the code snippet:
<tabpanels> <tabpanel forEach="${categories}" height="380px" > <vbox> <zscript> import org.zkforge.petshop.model.CatalogFacade; List tmpproducts = new CatalogFacade().getProducts(each.categoryID); </zscript> <toolbarbutton forEach="${tmpproducts}" label="${each.name}" tooltiptext="${each.description}"> <attribute name="onClick">{ import org.zkforge.petshop.model.Item; String pID = self.getAttribute("productID"); List items = catalogwin.getItems(pID); Item item = items.get(0); catalogwin.refreshThumbs(items); catalogwin.refreshItem(item); }</attribute> <custom-attributes productID = "${each.productID}"/> </toolbarbutton> </vbox> </tabpanel> </tabpanels>
I figured this out. In case someone else encounters this question, the catalog.zul window 'uses' CatalogWindow which defines the categories variable in its constructor and assigns it the result of CatalogFacade.getCategories().
Asked: 2009-02-01 01:24:45 +0800
Seen: 152 times
Last updated: Feb 01 '09