-
Bug
-
Resolution: Fixed
-
Normal
-
9.0.0
-
Security Level: Jimmy
-
ZK 9.5.1 S1
Steps to Reproduce
run the code:
<zk> <zscript> ListModelList model = new ListModelList(Arrays.asList(new String[] {"A", "B", "C"})); </zscript> <listbox id="lb" model="${model}" > <listhead> <listheader id="lh1" label="col1"/> </listhead> </listbox> <button label="setLabel" onClick='lh1.setLabel("Hello");' /> <separator/> <button label="setLabel + replace model" onClick='lh1.setLabel("Hello"); model.clear(); model.add("replaced");'/> <button label="setLabel + clear model" onClick='lh1.setLabel("Hello"); model.clear();'/> <button label="setLabel + invalidatePartial" onClick='lh1.setLabel("Hello"); lb.invalidatePartial("rows");'/> <separator/> <button label="workaround (call invalidate)" onClick='lh1.setLabel("Hello"); model.clear(); lb.invalidate();'/> </zk>
1a) click "setLabel + replace model"
1b) click "setLabel + clear model" (simpler case)
1c) click "setLabel + invalidatePartial" (isolated case)
Current Result
the label of listheader remains the same after each 1st step (1a, 1b, 1c)
Expected Result
the label of listheader should be updated after calling setLabel("Hello")
Debug Information
"invalidatePartial" will not rerender head rows, only the listitems by design.
this works when clicking "setLabel" individiually (without "invalidatePartial")
Workaround
call listbox.invalidate() manually to trigger a full component rerender
- is duplicated by
-
ZK-4709 listbox invalidate partial missing to updating listheader
- Closed