b30-1826808.zul

来自「ZK是一个Ajax Java Web框架」· ZUL 代码 · 共 49 行

ZUL
49
字号
<?xml version="1.0" encoding="UTF-8"?><!--B30-1826808.zul{{IS_NOTE	Purpose:			Description:			History:		Thu Nov 22 09:18:06 TST 2007, Created by jumperchen}}IS_NOTECopyright (C) 2007 Potix Corporation. All Rights Reserved.{{IS_RIGHT}}IS_RIGHT--><window title="Slow Drag-and-Drop" border="normal">Drag and drop with a large number of droppables using the same droppablestring seems to be really slow (Mozilla 1.7.12 on Solaris, Firefox 2.0 onSolaris and MSIE 6.0 on Win2K).Try Drag and Drop using this code on http://zkoss.org/zkdemo/userguide/with 'itemCount = 25' and the app becomes busy, 'itemCount = 100' and thebrowser stucks. With 'itemCount = 1000' there will no response anymore. 	<listbox id="src" multiple="true" width="300px">		<attribute name="onCreate">			{ 			int itemCount = 250; 			for(int i = 0; i&lt;itemCount; i++){				Listitem li = new Listitem("item "+i);				li.setDraggable("true"); 				li.setDroppable("true");				li.addEventListener("onDrop", new EventListener() { 					public	boolean isAsap() {						return false;					} 					public void onEvent(Event event) throws UiException { 					} 				}); 				li.setParent(self); 			} 			}		</attribute>	</listbox></window>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?