Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-3630

shadow components inside a Listbox' template cause an exception

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 8.0.4.2
    • Fix Version/s: 8.5.2
    • Component/s: None
    • Security Level: Jimmy
    • Labels:
      None

      Description

      Steps to Reproduce

      1. uncomment the first listbox
      2. run the attached zul

      Current Result

      
      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.doInitRenderer(Listbox.java:2584)
      	at org.zkoss.zul.Listbox.onInitRender(Listbox.java:2537)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:497)
      	at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:3144)
      	at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:3075)
      	at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:138)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1853)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1625)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage0(UiEngineImpl.java:548)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage(UiEngineImpl.java:369)
      	at org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:211)
      	at org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:137)
      	
      

      Expected Result

      no exception.

      Debug Info

      • there are 2 comparison cases in the attached zul

      Workaround

      • use EL instead of data binding

        Issue Links

          Activity

          Hide
          Anonymous added a comment -

          Fixed since 2018/04/13

          Show
          Anonymous added a comment - Fixed since 2018/04/13

            People

            • Assignee:
              klyvechen klyvechen
              Reporter:
              hawk hawk
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 day Original Estimate - 1 day
                1d
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 week, 3 days
                1w 3d