Processing...

Suggested case list:

Using timer to refresh a grid

383guest172.69.33.12125nk0uiMay 7, 2020 7:23:47 AMlink

user model to move item to another listbox

120guest162.158.193.148d0n3krApr 2, 2020 5:28:28 AMlink

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

Latest 10 Fiddles :

combobox long comboitem

4guest108.162.221.13617ljsinJun 13, 2024 7:41:58 AMlink

search box

1guest162.158.178.591td9gqbJun 13, 2024 1:56:31 AMlink

Messagebox progress bar

1guest162.158.129.1862331bsuJun 11, 2024 10:12:09 PMlink

Vflex

39guest172.70.134.752vd369jJun 11, 2024 8:55:42 PMlink

Vflex

38guest172.70.34.882vd369jJun 11, 2024 8:54:26 PMlink

Vflex

37guest172.70.34.882vd369jJun 11, 2024 8:54:21 PMlink

Vflex

36guest172.70.34.882vd369jJun 11, 2024 8:54:21 PMlink

Vflex

35guest172.70.34.882vd369jJun 11, 2024 8:54:20 PMlink

flex broken zk 10

1guest172.69.135.201uue6c5Jun 11, 2024 4:46:35 PMlink

Another new ZK fiddle

6guest172.69.192.2103tip2nmJun 10, 2024 11:24:07 AMlink

B30-1823207

1JamesChu162.158.91.272ffbcatSep 19, 2023 4:08:22 AMlink

resources

index.zulzul<?xml version="1.0" encoding="UTF-8"?> <?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" ?> <zk> <html><![CDATA[ 1. Select randomly an item from the 1st listbox.<br/> 2. The selected item should appear in the 2nd listbox.<br/> 3. Repeat 1 and 2 in RANDOM order, the 2nd listbox should list items in order no matter the added sequence.<br/> 4. Press the parentModel button and check the real order of the 2nd listbox. It should be in order.<br/> 5. Press the parents button and check the real order of the inner TreeMap. It should be in order.<br/> 6. If everything ok. Now start to check "remove" item from 2nd listbox.<br/> 7. DoubleClick randomly on the item of the 2nd listbox and check if it is removed properly and kept the order.<br/> 8. Now repeate 4 and 5 to see if the inner data structure is in the same order as shown on the 2nd listbox.<br/> ]]></html> <window closable="true" id="testArticoloWind" width="200px" title="Test" xmlns="http://www.zkoss.org/2005/zul" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.zkoss.org/2005/zul http://www.zkoss.org/2005/zul/zul.xsd "> <zscript><![CDATA[ public class BlahComparator implements Comparator { public int compare(Object o1, Object o2) { int p1 = ((Blah)o1).getNumber(); int p2 = ((Blah)o2).getNumber(); int res = 0; if(p1 > p2) res = 1; else if(p1 < p2) res = -1; return res; } } class Person { TreeMap parents = new TreeMap(new BlahComparator()); public TreeMap getParents(){ return parents; } public void addParent(Object o){ parents.put(o, new Integer(o.getAge())); } } class Blah implements Comparable{ int age = 10; int number = 0; private String name ; private static int counter = 1; public Blah(int age){ name = "Blah " + Integer.toString((number = counter++)); this.age = age; } public void setName(String n){ name = n; } public String getName(){ return name; } public String toString(){ return name; } public int getNumber(){ return number; } public int getAge() { return age; } public int compareTo(Object o){ int n = ((Blah)o).getNumber(); if(number > n) return 1; if(number < n) return -1; return 0; } } Person person = new Person(); int actionCounter = 1; ArrayList l = new ArrayList(20); java.util.Random rand = new java.util.Random(); for(int i = 0; i < 20; i++) l.add(new Blah(rand.nextInt(50)+1)); ]]></zscript> <groupbox> <caption label="1st listbox"/> <listbox model="@{l}" mold="select" > <attribute name="onSelect"> Blah p = l.get(self.selectedIndex); ((Map)parentsList.getModel()).put(p, new Integer(p.getAge())); </attribute> </listbox> </groupbox> <groupbox> <caption label="2nd listbox"/> <listbox id="parentsList" model="@{person.parents}"> <listhead> <listheader label="Name"/> <listheader label="Age"/> </listhead> <listitem self="@{each=obj}" value="@{obj}"> <attribute name="onDoubleClick"> ((Map)parentsList.getModel()).remove(((java.util.Map.Entry)self.value).getKey()); </attribute> <listcell label="@{obj.key}"/> <listcell label="@{obj.value}"/> </listitem> </listbox> </groupbox> <button label="parentModel" onClick='alert(""+parentsList.getModel())'/> <button label="parents" onClick='alert(""+person.getParents())'/> <button label="Listitem.getItems()"> <attribute name="onClick"><![CDATA[ StringBuffer sb = new StringBuffer(124); for(Iterator it = parentsList.getItems().iterator(); it.hasNext();) { Listitem li = (Listitem) it.next(); sb.append(li.getValue()+","); } alert(sb.toString()); ]]></attribute> </button> </window> </zk>