z30-tree-0007.zul

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

ZUL
31
字号
<zk>
	<window title="treemodel with paging">
		<zscript>
			import org.zkoss.zkdemo.test2.tree.TreeModelA;
			//An ArrayList is created to be the root of tree
			ArrayList mother = new ArrayList();
			
			for(int i=0; i &lt; 9; i++){
				mother.add("Person"+i);
			}
			
			ArrayList child = new ArrayList();
			
			for(int i =0; i &lt; 50; i++){
				child.add("Sub"+i);
			}	
			
			mother.add(child);
			
			for(int i=0; i &lt; 31; i++){
				mother.add("Person"+i);
			}
			
			//TreeModelA class is contructed, only the root "mother" of tree is passed to its constructor.
			TreeModelA tma = new TreeModelA(mother);
			
			
		</zscript>
		<tree model="${tma}" id="tree" ></tree>
	</window>
</zk>

⌨️ 快捷键说明

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