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 :

ZK Listbox ROD (8.6.0.1) - fixed

2guest108.162.212.353m3rnqiAug 6, 2020 9:11:01 PMlink

listbox and checkboxes

298guest162.158.187.1191vilk89Aug 6, 2020 5:49:13 PMlink

Another new ZK fiddle

1Edison108.162.210.1483og97u4Aug 6, 2020 5:10:53 PMlink

NavItem

24guest172.68.226.172b9sft4Aug 6, 2020 3:36:21 PMlink

Another new ZK fiddle

1guest172.69.33.491diak8eAug 6, 2020 8:55:43 AMlink

Amountbox de_CH

1guest162.158.34.212256j7stAug 6, 2020 7:19:25 AMlink

vflex and rows on listbox

4guest162.158.187.161glef8Aug 5, 2020 4:20:35 PMlink

vflex and rows on listbox

3guest162.158.187.161glef8Aug 5, 2020 4:20:15 PMlink

Amountbox de_CH

1guest172.69.55.94q2bd5iAug 5, 2020 3:53:27 PMlink

different style for each listitem

10guest162.158.165.18847laosAug 5, 2020 6:04:45 AMlink

upload canvas/paste

11cor3000162.158.119.313g4588eJul 8, 2020 3:37:11 AMlink

resources

index.zulzul<zk xmlns:n="native"> <script src="imagehandling.js"/> <window border="normal" title="hello" apply="pkg$.TestComposer"> <n:canvas width="400px" height="300px" id="mycanvas"></n:canvas> </window> </zk> TestComposer.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.util.media.*; import org.zkoss.zk.au.*; import org.zkoss.zk.au.out.*; import org.zkoss.zul.*; import java.util.*; public class TestComposer extends GenericForwardComposer{ public void doAfterCompose(Component comp) throws Exception { super.doAfterCompose(comp); Image testOutput = new Image(); comp.appendChild(testOutput); Button drawButton = new Button("draw"); drawButton.setWidgetListener("onClick", "draw(document.getElementById('mycanvas'))"); comp.appendChild(drawButton); Button uploadButton = new Button("upload"); uploadButton.setWidgetListener("onClick", "upload(this, document.getElementById('mycanvas'))"); uploadButton.addEventListener("onImageUpload", event -> { Map data = (Map) event.getData(); List<org.zkoss.image.Image> uploads = (List<org.zkoss.image.Image>) desktop.removeAttribute(uploadButton.getUuid() + "." + data.get("sid")); Clients.log(uploads.toString()); //use uploads.get(0).getByteData() / getStreamData() to get the actual data testOutput.setContent(uploads.get(0)); }); comp.appendChild(uploadButton); } } imagehandling.jsjavascriptfunction draw(canvas) { var context = canvas.getContext("2d"); context.fillStyle = "#000000"; context.fillRect(0, 0, 400, 300); context.fillStyle = "#ff0000"; context.fillRect(50, 50, 300, 200); } var sidCounter = 0; function uploadCanvas(wgt, canvas) { var blob = zUtl.convertDataURLtoBlob(canvas.toDataURL('image/png')); uploadImage(wgt, blob); } function initPasteImage(wgt) { wgt.$n().addEventListener('paste', function(e) { // adapted from: https://stackoverflow.com/questions/6333814/how-does-the-paste-image-from-clipboard-functionality-work-in-gmail-and-google-c var items = (event.clipboardData || event.originalEvent.clipboardData).items; console.log(JSON.stringify(items)); // will give you the mime types // find pasted image among pasted items var blob = null; for (var i = 0; i < items.length; i++) { if (items[i].type.indexOf("image") === 0) { blob = items[i].getAsFile(); } } // load image if there is a pasted image if (blob !== null) { uploadImage(wgt, blob); } else { alert('no image item found in clipboard items'); } }); } function uploadImage(wgt, blob) { var formData = new FormData(); var xhr = new XMLHttpRequest(); var sid = sidCounter++; formData.append('file', blob); xhr.onload = function (e) { if (this.readyState === 4) { if (this.status === 200) { wgt.fire('onImageUpload', {sid: sid}, {toServer: true}); } else { zk.error(xhr.statusText); } } }; zk.UploadUtils.ajaxUpload(wgt, xhr, formData, sid); }