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

Combobox without an explicit itemRender mistakenly uses parent's template

XMLWordPrintable

      Steps to Reproduce

      1. Open attached ZUL

      Have a Combobox inside a grid row renderer defined using <template>, and do not assign an itemRenderer (not necessary for Strings in model of combobox): tries to use the grid's row renderer, resulting in an error message (try with attached zul)

      Current Result

      org.zkoss.zk.ui.UiException: Unsupported child for Combobox: <Row null>
      	at org.zkoss.zul.Combobox.beforeChildAdded(Combobox.java:1113)
      	at org.zkoss.zk.ui.AbstractComponent.insertBefore(AbstractComponent.java:1361)
      	at org.zkoss.zk.ui.impl.AbstractUiFactory.newComponent(AbstractUiFactory.java:144)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:921)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:891)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:778)
      	at org.zkoss.zk.ui.impl.UiEngineImpl$TemplateImpl.create(UiEngineImpl.java:2362)
      	at org.zkoss.bind.impl.BindComboitemRenderer.render(BindComboitemRenderer.java:77)
      	at org.zkoss.zul.Combobox$Renderer.render(Combobox.java:637)
      	at org.zkoss.zul.Combobox.onInitRender(Combobox.java:513)
      	at jdk.internal.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      	at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:3153)
      	at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:3082)
      	at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:138)
      

      Expected Result

      Just render the texts, using a comboitem instead of a row

       

            Unassigned Unassigned
            chemFelix chemFelix
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: