-
Bug
-
Resolution: Won't Fix
-
Normal
-
None
-
8.6.0
-
None
-
Security Level: Jimmy
-
None
Steps to Reproduce
1. run the zul below
<zscript><![CDATA[ ListModelList model = new ListModelList(); model.add("item1"); model.add("item2"); model.add("item3"); model.add("best"); ]]></zscript> <listbox apply="org.zkoss.bind.BindComposer" width="300px" height="600px" model="@load(model)"> <listhead> <listheader label="item"/> </listhead> <template name="model"> <if test="@load(each eq 'best')"> <listitem> <listcell> <button label="test"/> </listcell> </listitem> </if> </template> </listbox>
Current Result
SEVERE:
org.zkoss.zk.ui.UiException: The model template must have exactly one item, not 0
at org.zkoss.bind.impl.BindListitemRenderer.render(BindListitemRenderer.java:94)
at org.zkoss.zul.Listbox$Renderer.render(Listbox.java:2769)
at org.zkoss.zul.Listbox.renderItems(Listbox.java:2891)
at org.zkoss.zul.Listbox.service(Listbox.java:3731)
at org.zkoss.zk.ui.impl.DesktopImpl.service(DesktopImpl.java:784)
at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1310)
at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:611)
Expected Result
one item rendered
debug info
this bug has a similar problem with ZK-3630
- relates to
-
ZK-3630 shadow components inside a Listbox' template cause an exception
- Closed