-
Bug
-
Resolution: Fixed
-
Critical
-
9.0.0
-
Security Level: Jimmy
-
ZK 9.0.1 S1
-
None
Steps to Reproduce
run the code:
<zk> <zscript> ListModelList model = new ListModelList(Arrays.asList(new String[] {"A", "B", "C"})); </zscript> <custom-attributes org.zkoss.zul.listbox.rod="false"/> <listbox id="lb" model="${model}" > <listhead> <listheader label="col1"/> </listhead> </listbox> <button label="hide" onClick="lb.setVisible(false);"/> <button label="show" onClick="lb.setVisible(true);"/> <separator/> <button label="show + replace model" onClick='lb.setVisible(true); model.clear(); model.add("replaced");'/> <button label="show + clear model" onClick='lb.setVisible(true); model.clear();'/> <button label="show + invalidatePartial" onClick='lb.setVisible(true); lb.invalidatePartial("rows");'/> <separator/> <button label="workaround (call invalidate)" onClick='lb.setVisible(true); model.clear(); lb.invalidate();'/> </zk>
1) click "hide" (hides listbox)
2a) click "show + replace model"
2b) click "show + clear model" (simpler case)
2c) click "show + invalidatePartial" (isolated case)
Current Result
the listbox remains invisible after each 2nd step (2a, 2b, 2c)
Expected Result
listbox should become visible after calling setVisible(true)
Debug Information
the AuResponse is missing the command to change the visibility, when "invalidatePartial" is triggered
e.g.: ["setAttr", [{$u: "kJxP0"}, "visible", true]]
this works when clicking "hide" -> "show" individiually (without "invalidatePartial")
Workaround
call listbox.invalidate() manually to trigger a full component rerender