Suggested case list:
Using timer to refresh a grid
383guest172.69.33.12125nk0uiMay 7, 2020 7:23:47 AMlinkuser model to move item to another listbox
120guest162.158.193.148d0n3krApr 2, 2020 5:28:28 AMlinkDisabled list item row passed to VM-1981
296fatih123160.83.36.13025nk0uiFeb 13, 2018 4:25:44 PMlinkDisabled list item row passed to VM-1981
295fatih123160.83.36.13025nk0uiFeb 13, 2018 4:25:16 PMlinkDisabled list item row passed to VM-1981
294fatih123160.83.36.13225nk0uiFeb 13, 2018 3:30:44 PMlinkgrid sample with ListModel/RowRenderer
816guest80.82.2.1312vah9ajFeb 21, 2017 11:42:21 AMlinkgrid sample with ListModel/RowRenderer
809guest175.98.113.1622vah9ajJan 26, 2017 9:19:33 AMlinkgrid sample with ListModel/RowRenderer
196guest79.185.142.402vah9ajApr 26, 2014 10:53:57 PMlinkgrid sample with ListModel/RowRenderer
195guest79.185.142.402vah9ajApr 26, 2014 10:53:54 PMlinkgrid sample with ListModel/RowRenderer
194guest79.185.142.402vah9ajApr 26, 2014 10:53:51 PMlinkgrid sample with ListModel/RowRenderer
193guest79.185.142.402vah9ajApr 26, 2014 10:53:48 PMlinkgrid sample with ListModel/RowRenderer
192guest79.185.142.402vah9ajApr 26, 2014 10:53:44 PMlinkgrid sample with ListModel/RowRenderer
191guest79.185.142.402vah9ajApr 26, 2014 10:53:40 PMlinkHierarchy table without using ZK PE/EE
1aaknai151.28.135.2131s871daJul 29, 2013 11:02:46 PMlinkgrid sample with ListModel/RowRenderer
128aaknai151.28.135.2132vah9ajJul 29, 2013 7:20:00 PMlinkuser model to move item to another listbox
1TonyQ114.25.109.94d0n3krApr 21, 2012 10:43:27 AMlinkUsing timer to refresh a grid
1TonyQ220.133.44.3725nk0uiFeb 17, 2012 3:17:34 AMlinkFire a event from child iframe
1TonyQ220.133.44.372eupjotFeb 3, 2012 5:04:52 AMlinkTextbox input restriction sample
1TonyQ72.21.245.2431b3nlr0Dec 20, 2011 10:09:10 AMlinkTest web core taglib in ZUL
1TonyQ198.203.175.175ofqkemDec 17, 2011 3:36:08 AMlinkLatest 10 Fiddles :
Textbox input restriction sample
1guest172.71.137.1339ahuuhJan 12, 2025 6:43:16 AMlinkZK MVVM Converter
21guest172.71.137.13816cf90oJan 12, 2025 6:35:27 AMlinkTemplate composition and include
35guest172.70.246.66vroi36Jan 10, 2025 3:44:06 PMlinkTemplate composition and include
34guest172.70.246.66vroi36Jan 10, 2025 3:43:42 PMlinkTemplate composition and include
33guest172.70.246.66vroi36Jan 10, 2025 3:42:59 PMlinkTemplate composition and include
32guest172.70.246.67vroi36Jan 10, 2025 3:41:58 PMlinkTemplate composition and include
31guest172.70.246.66vroi36Jan 10, 2025 3:41:25 PMlinkTemplate composition and include
30guest172.70.246.66vroi36Jan 10, 2025 3:39:35 PMlinkTemplate composition and include
29guest172.70.246.66vroi36Jan 10, 2025 3:39:09 PMlinkTemplate composition and include
28guest172.70.246.67vroi36Jan 10, 2025 3:37:54 PMlinkmultiline messagebox with atodisable button
3jhefer60.234.221.123308os75Jul 24, 2012 8:41:51 AMlinkresources
index.zulzul<zk>
<window title="Hello World!!" border="normal" width="500px"
apply="pkg$.MessageBoxComposer">
<hbox>
<button id="btn_MultilineMessagebox"
label="MultilineMessagebox" width="200px" />
</hbox>
</window>
</zk>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);
}
}MessageBoxComposer.javajava
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.util.GenericForwardComposer;
public class MessageBoxComposer extends GenericForwardComposer {
private static final long serialVersionUID = 1L;
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
}
public void onClick$btn_MultilineMessagebox(Event event) throws InterruptedException {
String msg = "Hallo \n\nI'm a multi line Message.";
String title = "E r r o r !";
MultiLineMessageBox.doSetTemplate();
MultiLineMessageBox.show(msg, title, MultiLineMessageBox.OK, "ERROR", true);
}
}