-
FEATURED COMPONENTS
First time here? Check out the FAQ!
why my select all checkbox doesnot appear in my listbox header?
........this is my zul file........
<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" />
.......this is my java .............
public void render(Listitem item, Object data) throws Exception
{
@SuppressWarnings("unchecked")
Map<String, String> map = (Map<String, String>) data;
countId = item.getIndex();
count = item.getIndex() + 1;
item.setAttribute(ZkConstants.RowData, map);
item.appendChild(buildCheckbox(null , count));
//Listcell lbl = new Listcell();
item.appendChild(buildLabel("LOCK_TABLE",map));
item.appendChild(buildLabelDateTime("LAST_OPR_DATE", map));
item.appendChild(buildLabel("LOCK_KEY1", map));
item.appendChild(buildLabel("LOCK_KEY2", map));
item.appendChild(buildLabel("LOCK_KEY3", map));
item.appendChild(buildLabel("LOCK_KEY4", map));
item.appendChild(buildLabel("LOCK_KEY5", map));
}
private Listcell buildCheckbox(String value , Integer recordNo)
{
Listcell lbl = new Listcell ();
Checkbox chkbox = new Checkbox();
String strRecordNo = null;
strRecordNo = Integer.toString(recordNo);
chkbox.setId("chkbox_"+countId);
chkbox.setChecked(false);
lbl.setLabel(value);
lbl.setLabel(strRecordNo);
lbl.appendChild(chkbox);
return (lbl);
}
thanks for respond :)
You have to use multiple="true"
and checkmark="true"
Asked: 2013-10-11 09:04:41 +0800
Seen: 20 times
Last updated: Oct 11 '13