-
FEATURED COMPONENTS
First time here? Check out the FAQ!
hye all..my problem is i want the option for user to select all the data in listbox. But the problem is my select all checkbox does not appear in my listbox header even i put multiple="true" checkmark="true" in the header.
In your afterCompose method add below line of code
model.setMultiple(true);
dear sjoshi..
<listbox id="lbxSdata" fixedLayout="true" multiple="false" checkmark="false" sizedByContent="false" span='true'
emptyMessage="${lbl:name('No items match your search')}">
<listhead sizable="true" >
<listheader hflex="4" label="${lbl:name('Action')}" align="left" />
<listheader hflex="10" sort="auto(LOCK_TABLE)" label="${lbl:name('Table')}" align="left" />
<listheader hflex="10" sort="auto(LAST_OPR_DATE)" label="${lbl:name('Last Date')}" align="left" />
<listheader hflex="5" sort="auto(LOCK_KEY1)" label="${lbl:name('Key 1')}" align="left" />
<listheader hflex="5" sort="auto(LOCK_KEY2)" label="${lbl:name('Key 2')}" align="left" />
<listheader hflex="5" sort="auto(LOCK_KEY3)" label="${lbl:name('Key 3')}" align="left" />
<listheader hflex="5" sort="auto(LOCK_KEY4)" label="${lbl:name('Key 4')}" align="left" />
<listheader hflex="5" sort="auto(LOCK_KEY5)" label="${lbl:name('Key 5')}" align="left" />
<listheader hflex="15" sort="auto(LOCK_REMARK)" label="${lbl:name('Remarks')}" align="left" />
</listhead>
this is my search controller where i put model.setMultiple(true)
private void refreshModel(int _startPageNumber, HParam _scriteria)
{
int pageSize = PageUtil.getLinesPerPage();
sdataPaging.setPageSize(pageSize);
if (_startPageNumber == 0) // first page
sdataPaging.setActivePage(0); // reset it
model = new LockmstSearchPagingListModel(pageSize);
model.getPageData(_startPageNumber, _scriteria);
sdataPaging.setTotalSize(model.getTotalSize());
model.setMultiple(true);
lbxSdata.setModel(model);
}
hi sjoshi, i put the setMultiple(true) in my refreshModel and the result is still same, no select all check box in my listbox header. So i try to test my zul file without connect it to java and the checkbox appear in my listbox header. i dont know why it happen like that?
susu ( 2013-11-15 07:41:22 +0800 )editHi
The selected All checkbox spec has been changed since ZK 5.0.11:
http://books.zkoss.org/wiki/ZKComponentReference/Data/Listbox#Version_History
Asked: 2013-11-07 08:20:40 +0800
Seen: 60 times
Last updated: Nov 26 '13