-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I am testing 'list group' example of zk live demo and I wonder if there is any way to show the data with "list group" closed.
<div apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('demo.listbox.list_group.ListGroupViewModel')">
<listbox model="@load(vm.groupModel)" height="400px" checkmark="true"
onSelect="@command('selectGroup', data=event.reference.value)" multiple="true"
itemRenderer="demo.listbox.list_group.FoodListGroupRenderer">
<!-- Make Grouping item selectable-->
<custom-attributes org.zkoss.zul.listbox.groupSelect="true" />
<listhead>
<listheader width="160px" sort="auto(Category)" label="Category" />
<listheader width="140px" sort="auto(Name)" label="Name" />
<listheader hflex="1" sort="auto(TopNutrients)" label="Top Nutrients" />
<listheader hflex="1" align="center" sort="auto(DailyPercent)" label="% of Daily" />
<listheader hflex="1" align="center" sort="auto(Calories)" label="Calories" />
<listheader width="140px" sort="auto(Quantity)" label="Quantity" />
</listhead>
</listbox>
</div>
Thank you.
See this zk example it have already a attribute open="false"
<?xml version="1.0" encoding="UTF-8"?>
<zk>
Listbox support Grouping
<listbox id="listbox" width="250px">
<listhead sizable="true" id="h">
<listheader id="h1" label="name" sort="auto" />
<listheader id="h2" label="gender" sort="auto" />
</listhead>
<listgroup id="gp1" open="false">
<listcell label="Group1"/>
<listcell label="Group2"/>
</listgroup>
<listitem>
<listcell label="a Mary" />
<listcell label="a FEMALE" />
</listitem>
<listitem>
<listcell label="b Mary" />
<listcell label="b FEMALE" />
</listitem>
<listitem id="li1">
<listcell label="c Mary1" />
<listcell label="c FEMALE1" />
</listitem>
<listitem>
<listcell label="d Mary" />
<listcell label="d FEMALE" />
</listitem>
<listitem>
<listcell label="e John" />
<listcell label="e MALE" />
</listitem>
<listgroup id="g2" label="Grouping 2" />
<listitem>
<listcell label="Jane" />
<listcell label="FEMALE" />
</listitem>
<listitem>
<listcell label="Henry" />
<listcell label="MALE" />
</listitem>
</listbox>
</zk>
Asked: 2014-11-27 10:59:56 +0800
Seen: 46 times
Last updated: Nov 30 '14