⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 b30-1852313.zul

📁 ZK是一个Ajax Java Web框架
💻 ZUL
字号:
<?xml version="1.0" encoding="UTF-8"?><!--B30-1852313.zul{{IS_NOTE	Purpose:			Description:			History:		Tue Dec 18 11:32:12 TST 2007, Created by jumperchen}}IS_NOTECopyright (C) 2007 Potix Corporation. All Rights Reserved.{{IS_RIGHT}}IS_RIGHT--><zk	xmlns="http://www.zkoss.org/2005/zul"	xmlns:h="http://www.w3.org/1999/xhtml"	xmlns:n="http://www.zkoss.org/2005/zk/native">	<n:h3>When you open the tree node, the browser should not have any error!</n:h3>	<window>		<zscript><![CDATA[	int counter = 3;	String az = "The quick brown fox jumped over the lazy dog";	Random r = new Random();	EventListener aa = new EventListener()	{	  public void onEvent(Event event)	  {	    autoAdd( event.target );	  }	};	void autoAdd(Treeitem parent)	{		if ( parent.treechildren == null )		  parent.appendChild( new Treechildren() );		if ( !parent.empty )		  return;		for (int i=0; i < 10; i++)		{			Treeitem ti = new Treeitem();			Treerow  tr = new Treerow();			String   c  = Integer.toString( ++counter );			for ( int x=0 ; x < 4 ; x++ )			{				switch ( r.nextInt() % 3 )				{				  case 0: createLabelCell (c).setParent(tr); break;				  case 1: createDoubleCell(counter).setParent(tr);				  case 2: createLabelCell (az).setParent(tr); break;				}			}			tr.setParent(ti);			ti.setOpen(false);			ti.appendChild( new Treechildren() );			ti.addEventListener( "onOpen", aa );			ti.setParent( parent.treechildren );		}	}	Treecell createDoubleCell( Double x )	{	  Treecell tc = new Treecell();	  tc.appendChild( new Doublebox( x ) );	  return tc;	}	Treecell createLabelCell( String x )	{	  Treecell tc = new Treecell();	  tc.appendChild( new Label( x ) );	  return tc;	}	]]></zscript>		<tree			id="tree"			rows="30"			width="100%"			pageSize="-1">			<treecols>				<treecol label="A" />				<treecol label="B" />				<treecol label="C" />				<treecol label="D" />			</treecols>			<treechildren>				<treeitem open="false" onOpen="if (event.open) autoAdd(self)">					<treerow>						<treecell label="Item 1.a" />						<treecell label="Item 1.b" />						<treecell label="Item 1.c" />						<treecell label="Item 1.d" />					</treerow>					<treechildren />				</treeitem>				<treeitem open="false" onOpen="if (event.open) autoAdd(self)">					<treerow>						<treecell label="Item 2.a" />						<treecell label="Item 2.b" />						<treecell label="Item 2.c" />						<treecell label="Item 2.d" />					</treerow>					<treechildren />				</treeitem>				<treeitem open="false" onOpen="if (event.open) autoAdd(self)">					<treerow>						<treecell label="Item 3.a" />						<treecell label="Item 3.b" />						<treecell label="Item 3.c" />						<treecell label="Item 3.d" />					</treerow>					<treechildren />				</treeitem>			</treechildren>		</tree>	</window></zk>

⌨️ 快捷键说明

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