ZK是一个Ajax Java Web框架

源代码在线查看: b30-1852313.zul

软件大小: 51666 K
上传用户: QQ
关键词: Ajax Java Web
下载地址: 免注册下载 普通下载 VIP

相关代码

																B30-1852313.zul								{{IS_NOTE					Purpose:											Description:											History:						Tue Dec 18 11:32:12 TST 2007, Created by jumperchen				}}IS_NOTE								Copyright (C) 2007 Potix Corporation. All Rights Reserved.								{{IS_RIGHT				}}IS_RIGHT				-->									xmlns="http://www.zkoss.org/2005/zul"					xmlns:h="http://www.w3.org/1999/xhtml"					xmlns:n="http://www.zkoss.org/2005/zk/native">					When you open the tree node, the browser should not have any error!																												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;					}					]]>																					id="tree"							rows="30"							width="100%"							pageSize="-1">																																																																																																																																																																																																																																																																																																																																															

相关资源