<ec:tree
[color=red]identifier="id" [/color]
[color=red]parentAttribute="parentId" [/color]
items="dirList"
action="Dir/search.do"
[color=red]view="org.extremecomponents.tree.TreeView"[/color]
filterable="false"
sortable="false"
var="dir"
>
<ec:row>
<ec:column property="name" title="名称" [color=red]cell="org.extremecomponents.tree.TreeCell"[/color]/>
<ec:column property="descripsion" title="描述"/>
</ec:row>
</ec:tree>
主要是红色部分和ec:table有所不同,identifier声明了用来区别每一个对象的属性,parentAttribute用来声明对象中记录父结点的属性。关键是在cell中定义Tree的显示方式,如果不这样做就和普通的ec:table没有区别了。
[color=red]identifier="id" [/color]
[color=red]parentAttribute="parentId" [/color]
items="dirList"
action="Dir/search.do"
[color=red]view="org.extremecomponents.tree.TreeView"[/color]
filterable="false"
sortable="false"
var="dir"
>
<ec:row>
<ec:column property="name" title="名称" [color=red]cell="org.extremecomponents.tree.TreeCell"[/color]/>
<ec:column property="descripsion" title="描述"/>
</ec:row>
</ec:tree>
主要是红色部分和ec:table有所不同,identifier声明了用来区别每一个对象的属性,parentAttribute用来声明对象中记录父结点的属性。关键是在cell中定义Tree的显示方式,如果不这样做就和普通的ec:table没有区别了。