-
FEATURED COMPONENTS
First time here? Check out the FAQ!
環境:zkgrails 1.0.2 (zk 5.0.6)
按下button1時,所有的assertation均通過
可是畫面上只隱藏了item1與item4
<?xml version="1.0" encoding="UTF-8"?> <?page zscriptLanguage="GroovyGrails"?> <zk xmlns="http://www.zkoss.org/2005/zul" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.zkoss.org/2005/zul http://www.zkoss.org/2005/zul/zul.xsd"> <window> <button label="button1"> <attribute name="onClick"> assert tree.treechildren.items.size() == 4 tree.treechildren.items*.visible = false assert tree.treechildren.items.findAll{it.visible}.size() == 0 </attribute> </button> <tree id="tree" rows="12"> <treechildren> <treeitem> <treerow> <treecell> <label value="item1"/> </treecell> </treerow> <treechildren> <treeitem> <treerow> <treecell> <label value="item2"/> </treecell> </treerow> </treeitem> <treeitem> <treerow> <treecell> <label value="item3"/> </treecell> </treerow> </treeitem> </treechildren> </treeitem> <treeitem> <treerow> <treecell> <label value="item4"/> </treecell> </treerow> </treeitem> </treechildren> </tree> </window> </zk>
Asked: 2011-04-27 04:08:06 +0800
Seen: 662 times
Last updated: May 01 '11