Processing...

Suggested case list:

Disabled list item row passed to VM-1981

296fatih123160.83.36.13025nk0uiFeb 13, 2018 4:25:44 PMlink

Disabled list item row passed to VM-1981

295fatih123160.83.36.13025nk0uiFeb 13, 2018 4:25:16 PMlink

Disabled list item row passed to VM-1981

294fatih123160.83.36.13225nk0uiFeb 13, 2018 3:30:44 PMlink

grid sample with ListModel/RowRenderer

816guest80.82.2.1312vah9ajFeb 21, 2017 11:42:21 AMlink

grid sample with ListModel/RowRenderer

809guest175.98.113.1622vah9ajJan 26, 2017 9:19:33 AMlink

grid sample with ListModel/RowRenderer

196guest79.185.142.402vah9ajApr 26, 2014 10:53:57 PMlink

grid sample with ListModel/RowRenderer

195guest79.185.142.402vah9ajApr 26, 2014 10:53:54 PMlink

grid sample with ListModel/RowRenderer

194guest79.185.142.402vah9ajApr 26, 2014 10:53:51 PMlink

grid sample with ListModel/RowRenderer

193guest79.185.142.402vah9ajApr 26, 2014 10:53:48 PMlink

grid sample with ListModel/RowRenderer

192guest79.185.142.402vah9ajApr 26, 2014 10:53:44 PMlink

grid sample with ListModel/RowRenderer

191guest79.185.142.402vah9ajApr 26, 2014 10:53:40 PMlink

Hierarchy table without using ZK PE/EE

1aaknai151.28.135.2131s871daJul 29, 2013 11:02:46 PMlink

grid sample with ListModel/RowRenderer

128aaknai151.28.135.2132vah9ajJul 29, 2013 7:20:00 PMlink

user model to move item to another listbox

1TonyQ114.25.109.94d0n3krApr 21, 2012 10:43:27 AMlink

Using timer to refresh a grid

1TonyQ220.133.44.3725nk0uiFeb 17, 2012 3:17:34 AMlink

Fire a event from child iframe

1TonyQ220.133.44.372eupjotFeb 3, 2012 5:04:52 AMlink

Textbox input restriction sample

1TonyQ72.21.245.2431b3nlr0Dec 20, 2011 10:09:10 AMlink

Test web core taglib in ZUL

1TonyQ198.203.175.175ofqkemDec 17, 2011 3:36:08 AMlink

identify firefox or not in server side

1TonyQ198.203.175.1751nv2qreDec 10, 2011 4:25:04 AMlink

ZK addThis integration

1TonyQ198.203.175.1751apl96jNov 5, 2011 4:12:50 AMlink

Latest 10 Fiddles :

Busy indicator appears on opened modal

4guest202.53.12.422jj2p1oAug 23, 2019 7:31:35 AMlink

Icon and Label Button

1guest212.186.131.2043251pmoAug 23, 2019 7:08:17 AMlink

Another new ZK fiddle

5guest181.48.10.24231u9e3aAug 22, 2019 9:18:17 PMlink

Another new ZK fiddle

4guest181.48.10.24231u9e3aAug 22, 2019 9:04:44 PMlink

Another new ZK fiddle

3guest181.48.10.24231u9e3aAug 22, 2019 8:38:04 PMlink

Another new ZK fiddle

2guest181.48.10.24231u9e3aAug 22, 2019 7:55:39 PMlink

Another new ZK fiddle

1guest181.48.10.24231u9e3aAug 22, 2019 7:44:26 PMlink

Another new ZK fiddle

1guest181.15.91.212mgcjgbAug 22, 2019 6:46:49 PMlink

Another new ZK fiddle

2guest165.225.72.812c2ihfnAug 22, 2019 1:45:45 PMlink

Another new ZK fiddle

1guest165.225.72.812c2ihfnAug 22, 2019 1:45:21 PMlink

Tree column and row drag n drop

1Robert220.135.202.1406ji0f0Oct 14, 2013 10:42:57 AMlink

resources

index.zulzul<zk> <window apply="pkg$.TreeDndComposer" border="normal" width="500px"> <tree id="dndTree"> <treecols> <treecol draggable="true" droppable="true" label="${$composer.columnOrder[0]}" /> <treecol draggable="true" droppable="true" label="${$composer.columnOrder[1]}" /> <treecol draggable="true" droppable="true" label="${$composer.columnOrder[2]}" /> </treecols> <template name="model"> <treeitem value="${each}" draggable="${!each.leaf}" droppable="${!each.leaf}" onDrop="$composer.onRowDrop(event)"> <treerow> <treecell label="${each.data[$composer.columnOrder[0]]}" /> <treecell label="${each.data[$composer.columnOrder[1]]}" /> <treecell label="${each.data[$composer.columnOrder[2]]}" /> </treerow> </treeitem> </template> </tree> </window> </zk>TreeDndComposer.javajavaimport java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.List; import java.util.Set; import org.zkoss.zk.ui.Component; import org.zkoss.zk.ui.event.DropEvent; import org.zkoss.zk.ui.select.SelectorComposer; import org.zkoss.zk.ui.select.annotation.Listen; import org.zkoss.zk.ui.select.annotation.Wire; import org.zkoss.zul.DefaultTreeModel; import org.zkoss.zul.DefaultTreeNode; import org.zkoss.zul.Tree; import org.zkoss.zul.TreeNode; import org.zkoss.zul.Treecol; import org.zkoss.zul.Treecols; import org.zkoss.zul.Treeitem; public class TreeDndComposer extends SelectorComposer { private DefaultTreeModel<MyRowInfo> treeModel; @Wire("#dndTree") Tree tree; private List<String> columnOrder = new ArrayList(Arrays.asList("name", "amount", "description")); @Override public void doAfterCompose(Component comp) throws Exception { super.doAfterCompose(comp); createTreeModel(); tree.setModel(treeModel); } @Listen("onDrop=treecol") public void onColumnDrop(DropEvent event) { if(event.getDragged() instanceof Treecol) { Treecol draggedCol = (Treecol)event.getDragged(); Treecol targetCol = (Treecol)event.getTarget(); String draggedColName = draggedCol.getLabel(); columnOrder.remove(draggedColName); int targetIndex = columnOrder.indexOf(targetCol.getLabel()); columnOrder.add(targetIndex, draggedColName); Treecols treecols = (Treecols) targetCol.getParent(); treecols.insertBefore(draggedCol, targetCol); //rerender tree tree.setModel(null); tree.setModel(treeModel); tree.invalidate(); } else { System.out.println("ignore invalid drop"); } } public void onRowDrop(DropEvent event) { System.out.println("row drop"); if(event.getDragged() instanceof Treeitem) { DefaultTreeNode<MyRowInfo> draggedValue = ((Treeitem)event.getDragged()).getValue(); DefaultTreeNode<MyRowInfo> targetValue = ((Treeitem)event.getTarget()).getValue(); //preserve open objects Set<TreeNode<MyRowInfo>> openObjects = treeModel.getOpenObjects(); TreeNode<MyRowInfo> draggedParent = draggedValue.getParent(); TreeNode<MyRowInfo> targetParent = targetValue.getParent(); draggedParent.getChildren().remove(draggedValue); int targetIndex = targetParent.getIndex(targetValue); targetParent.getChildren().add(targetIndex, draggedValue); //restore open objects treeModel.setOpenObjects(openObjects); } else { System.out.println("ignore invalid drop"); } } private void createTreeModel() { MyRowInfo rootInfo = new MyRowInfo("root", 0, "does not display"); TreeNode<MyRowInfo> root = new DefaultTreeNode<MyRowInfo>(rootInfo, createTreeNodes()); treeModel = new DefaultTreeModel<MyRowInfo>(root, true); } private List<TreeNode<MyRowInfo>> createTreeNodes() { List<TreeNode<MyRowInfo>> firstLevelChildren = new ArrayList<TreeNode<MyRowInfo>>(); firstLevelChildren.add(new DefaultTreeNode<MyRowInfo>(new MyRowInfo("cars", 90, "all cars"), createLeafNodes("car"))); firstLevelChildren.add(new DefaultTreeNode<MyRowInfo>(new MyRowInfo("fruit", 90, "all fruit"), createLeafNodes("fruit"))); firstLevelChildren.add(new DefaultTreeNode<MyRowInfo>(new MyRowInfo("tables", 90, "all tables"), createLeafNodes("table"))); firstLevelChildren.add(new DefaultTreeNode<MyRowInfo>(new MyRowInfo("items", 90, "all items"), createLeafNodes("item"))); return firstLevelChildren; } private Collection<? extends TreeNode<MyRowInfo>> createLeafNodes(String name) { List<TreeNode<MyRowInfo>> leafNodes = new ArrayList<TreeNode<MyRowInfo>>(); leafNodes.add(new DefaultTreeNode<MyRowInfo>(new MyRowInfo(name + "-1", 10, name + " number " + 1))); leafNodes.add(new DefaultTreeNode<MyRowInfo>(new MyRowInfo(name + "-2", 20, name + " number " + 2))); leafNodes.add(new DefaultTreeNode<MyRowInfo>(new MyRowInfo(name + "-3", 30, name + " number " + 3))); leafNodes.add(new DefaultTreeNode<MyRowInfo>(new MyRowInfo(name + "-4", 30, name + " number " + 4))); return leafNodes; } public List<String> getColumnOrder() { return columnOrder; } } MyRowInfo.javajavapublic class MyRowInfo { private String name; private int amount; private String description; public MyRowInfo(String name, int amount, String description) { super(); this.name = name; this.amount = amount; this.description = description; } public String getName() { return name; } public int getAmount() { return amount; } public String getDescription() { return description; } }