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

Another new ZK fiddle

176guest172.69.254.13419a19qgMay 17, 2024 8:45:43 AMlink

resources

index.zulzul<zk> <window border="normal" title="hello" apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('pkg$.ViewModel')"> <div>Welcome to ZK Fiddle , run it right now!</div> <combobox selectedItem="@bind(vm.dialPrefix) @converter('pkg$.MyConverter')" model="@load(vm.dialPrefixes)" value="@bind(vm.dialPrefix) @converter('pkg$.MyConverter')" readonly="true"> <template name="model" var="dialPrefixSuggestion"> <comboitem label="@load(dialPrefixSuggestion.label)" value="@load(dialPrefixSuggestion.value)" /> </template> </combobox> <label>Data: </label> <label value="@bind(vm.dialPrefix)"/> </window> </zk> ViewModel.javajavaimport org.zkoss.zk.ui.*; import org.zkoss.zk.ui.event.*; import org.zkoss.zk.ui.util.*; import org.zkoss.zk.ui.ext.*; import org.zkoss.zk.au.*; import org.zkoss.zk.au.out.*; import org.zkoss.zul.*; import java.util.*; import org.zkoss.bind.annotation.*; public class ViewModel { public List getDialPrefixes() { ArrayList data = new ArrayList(); data.add(new DialPrefixSuggestion("Default", null)); data.add(new DialPrefixSuggestion("0", "0")); data.add(new DialPrefixSuggestion("9", "9")); data.add(new DialPrefixSuggestion("4", "4")); return data; } public String dialPrefix = "9"; public void setDialPrefix(String str) { this.dialPrefix = str; } public String getDialPrefix() { return dialPrefix; } @Command public void logPrefix() { } } DialPrefixSuggestion.javajavaimport org.zkoss.zk.ui.*; import org.zkoss.zk.ui.event.*; import org.zkoss.zk.ui.util.*; import org.zkoss.zk.ui.ext.*; import org.zkoss.zk.au.*; import org.zkoss.zk.au.out.*; import org.zkoss.zul.*; public class DialPrefixSuggestion { private String label; private String value; public DialPrefixSuggestion(String label, String value) { this.label = label; this.value = value; } public String getLabel() { return label; } public void setLabel(String label) { this.label = label; } public String getValue() { return value; } public void setValue(String value) { this.value = value; } } MyConverter.javajavaimport org.zkoss.zk.ui.*; import org.zkoss.zk.ui.event.*; import org.zkoss.zk.ui.util.*; import org.zkoss.zk.ui.ext.*; import org.zkoss.zk.au.*; import org.zkoss.zk.au.out.*; import org.zkoss.zul.*; import java.util.*; import org.zkoss.bind.*; public class MyConverter implements Converter { private static int counter = 1; @Override public Object coerceToUi(Object val, Component comp, BindContext ctx) { Combobox listbox = (Combobox) comp; List<Comboitem> listitems = listbox.getItems(); if (listitems == null) { return null; } Messagebox.show("coerseToUI"+ "Counter: " + counter++ + "\nSize:" + listitems.size()+ "\nContext: " + ctx + "\nComponent: " + comp + "\nObject: " + val, "Information", Messagebox.OK, Messagebox.INFORMATION); for (Comboitem listItem : listitems) { if (listItem.getValue() != null && listItem.getValue().equals(val)) { Messagebox.show("Returning " + listItem.getValue(), "Information", Messagebox.OK, Messagebox.INFORMATION); return listItem; } } return listitems.isEmpty() ? null : listitems.get(0); // return "dummyUI"; } @Override @SuppressWarnings("unchecked") public Object coerceToBean(Object val, Component comp, BindContext ctx) { Messagebox.show("coerseToBean"+ "\nCounter: " + counter++ + "\nContext: " + ctx + "\nComponent: " + comp + "\nObject: " + val, "Information", Messagebox.OK, Messagebox.INFORMATION); Combobox listbox = (Combobox) comp; Messagebox.show("Item " + listItem.getClass().getName(), "Information", Messagebox.OK, Messagebox.INFORMATION); Comboitem item = (Comboitem) listItem; return listItem == null ? null : item; } }multiLineMessageBox.zulzul<?xml version="1.0" encoding="UTF-8"?> <?page title="Multiline Messagebox" language="xul/html"?> <window border="none" width="300px" closable="true" use="org.zkoss.zul.impl.MessageboxDlg"> <style dynamic="true"> .myMultiMessageBox .z-panel-header { background: #FC7A7C -1px; font-weight:bold; zoom: 1; border: 1px solid; line-height: 15px;} .myMultiMessageBox .z-panel-body { border-style:none solid solid; border-width:0 1px 1px; overflow:hidden; padding:0px; } </style> <panel title="${arg.title}" border="normal" sclass="myMultiMessageBox"> <panelchildren style="background-color: white;"> <hbox> <div class="${arg.icon}" /> <div sclass="z-messagebox" width="100%"> <label multiline="true" value="${arg.message}" sclass="word-wrap" width="100%" /> </div> <div width="10px" /> </hbox> <separator bar="true" /> <hbox style="margin-left:auto; margin-right:auto"> <button id="btn1" identity="${arg.OK}" autodisable="self" sclass="z-messagebox-btn" use="org.zkoss.zul.impl.MessageboxDlg$Button" if="${!empty arg.OK}" /> <button identity="${arg.CANCEL}" autodisable="self" sclass="z-messagebox-btn" use="org.zkoss.zul.impl.MessageboxDlg$Button" if="${!empty arg.CANCEL}" /> <button identity="${arg.YES}" sclass="z-messagebox-btn" autodisable="self" use="org.zkoss.zul.impl.MessageboxDlg$Button" if="${!empty arg.YES}" /> <button identity="${arg.NO}" sclass="z-messagebox-btn" use="org.zkoss.zul.impl.MessageboxDlg$Button" if="${!empty arg.NO}" /> <button identity="${arg.RETRY}" autodisable="self" sclass="z-messagebox-btn" use="org.zkoss.zul.impl.MessageboxDlg$Button" if="${!empty arg.RETRY}" /> <button identity="${arg.ABORT}" autodisable="self" sclass="z-messagebox-btn" use="org.zkoss.zul.impl.MessageboxDlg$Button" if="${!empty arg.ABORT}" /> <button identity="${arg.IGNORE}" autodisable="self" sclass="z-messagebox-btn" use="org.zkoss.zul.impl.MessageboxDlg$Button" if="${!empty arg.IGNORE}" /> </hbox> <separator></separator> </panelchildren> </panel> </window>MultiLineMessageBox.javajava /** * Copyright 2010 the original author or authors. * * This file is part of Zksample2. http://zksample2.sourceforge.net/ * * Zksample2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Zksample2 is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Zksample2. If not, see <http://www.gnu.org/licenses/gpl.html>. */ import java.io.Serializable; import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zul.Messagebox; /** * Extended messagebox that can show multilined messages. <br> * Lines can be breaked with the \n . <br> * <br> * * @changes 04.07.2009/sge extended for showing the icons <br> * 05.07.2009/sge added an empty line before and after the message. <br> * 08.07.2009/sge added for the EventListener * * @author sgerth */ public class MultiLineMessageBox extends Messagebox implements Serializable { private static final long serialVersionUID = 1L; // path of the messagebox zul-template private transient static String _templ = "multiLineMessageBox.zul"; public MultiLineMessageBox() { } public static void doSetTemplate() { setTemplate(_templ); } /** * Shows a message box and returns what button is pressed. A shortcut to * show(message, null, OK, INFORMATION). <br> * <br> * Simple MessageBox with customizable message and title. <br> * * @param message * The message to display. * @param title * The title to display. * @param icon * The icon to display. <br> * QUESTION = "z-msgbox z-msgbox-question"; <br> * EXCLAMATION = "z-msgbox z-msgbox-exclamation"; <br> * INFORMATION = "z-msgbox z-msgbox-imformation"; <br> * ERROR = "z-msgbox z-msgbox-error"; <br> * @param buttons * MultiLineMessageBox.CANCEL<br> * MultiLineMessageBox.YES<br> * MultiLineMessageBox.NO<br> * MultiLineMessageBox.ABORT<br> * MultiLineMessageBox.RETRY<br> * MultiLineMessageBox.IGNORE<br> * @param padding * true = Added an empty line before and after the message.<br> * * * @return * @throws InterruptedException */ public static final int show(String message, String title, int buttons, String icon, boolean padding) throws InterruptedException { String msg = message; if (padding == true) { msg = "\n" + message + "\n\n"; } if (icon.equals("QUESTION")) { icon = "z-msgbox z-msgbox-question"; } else if (icon.equals("EXCLAMATION")) { icon = "z-msgbox z-msgbox-exclamation"; } else if (icon.equals("INFORMATION")) { icon = "z-msgbox z-msgbox-imformation"; } else if (icon.equals("ERROR")) { icon = "z-msgbox z-msgbox-error"; } return show(msg, title, buttons, icon, 0, null); } /** * Shows a message box and returns what button is pressed. A shortcut to * show(message, null, OK, INFORMATION). <br> * <br> * Simple MessageBox with customizable message and title. <br> * * @param message * The message to display. * @param title * The title to display. * @param icon * The icon to display. <br> * QUESTION = "z-msgbox z-msgbox-question"; <br> * EXCLAMATION = "z-msgbox z-msgbox-exclamation"; <br> * INFORMATION = "z-msgbox z-msgbox-imformation"; <br> * ERROR = "z-msgbox z-msgbox-error"; <br> * @param buttons * MultiLineMessageBox.CANCEL<br> * MultiLineMessageBox.YES<br> * MultiLineMessageBox.NO<br> * MultiLineMessageBox.ABORT<br> * MultiLineMessageBox.RETRY<br> * MultiLineMessageBox.IGNORE<br> * @param padding * true = Added an empty line before and after the message.<br> * * * @return * @throws InterruptedException */ public static final int show(String message, String title, int buttons, String icon, boolean padding, EventListener listener) throws InterruptedException { String msg = message; if (padding == true) { msg = "\n" + message + "\n\n"; } if (icon.equals("QUESTION")) { icon = "z-msgbox z-msgbox-question"; } else if (icon.equals("EXCLAMATION")) { icon = "z-msgbox z-msgbox-exclamation"; } else if (icon.equals("INFORMATION")) { icon = "z-msgbox z-msgbox-imformation"; } else if (icon.equals("ERROR")) { icon = "z-msgbox z-msgbox-error"; } return show(msg, title, buttons, icon, 0, listener); } }