Which one do your prefer? :) If you want more continue reading to see
how to use the builder as a template to a list of items.
Using ZKBuilder as a Template
I think the builder is specially useful when I’ve a list of items and I
need to display these items with a specific layout one that the grid nor
the listbox can provide.
So I start as I started this post making the layout on a zul page and after I
get what I want, I made a ZKBuilder version and put it in a loop to
execute for each item I need to show.
1234567891011121314
// ...defitems=myService.getItems()items.each{item->div.append{toolbarbutton(label:item.name,href:item.link)if(userHasAccess){toolbarbutton(image:"edit.png",onClick:{editItemitem})toolbarbutton(image:"delete.png",onClick:{deleteItemitem})}}}//...publicdefeditItem(defitem){/* code to edit the item */}publicdefdeletetem(defitem){/* code to delete the item */}
ZkBuilder is bundled in ZKGrails 0.7.6 and earlier. Enjoy!