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

can't use <apply> inside a Listbox's <template>

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 8.0.3
    • Fix Version/s: 8.0.5
    • Component/s: None
    • Labels:
      None

      Description

      steps to reproduce

      1. run the attached zul
      2. scroll down to more than 50 rows

      current result

      Error message:
      The insertion [<Listitem null>] of the shadow [<Apply@0 (<Listbox tJFP0#box1>)>] cannot be orphan

      javascript error in the console tab:

      zul.mesh.wpd:317 Uncaught TypeError: Cannot read property 'length' of undefined(…)getSigRow @ zul.mesh.wpd:317clearCachedSize @ zul.mesh.wpd:1200syncSize @ zul.mesh.wpd:573onResponse @ zul.mesh.wpd:585$supers @ zk.wpd:10776onResponse @ zul.sel.wpd:1192$supers @ zk.wpd:10776onResponse @ zul.sel.wpd:1655_invoke @ zk.wpd:12829fire @ zk.wpd:12812(anonymous function) @ zk.wpd:12950setTimeout (async)fire @ zk.wpd:12949fire @ zk.wpd:13046fire @ zk.wpd:14348doCmdsNow @ zk.wpd:20354_doCmds @ zk.wpd:20597afterResponse @ zk.wpd:20232onResponseReady @ zk.wpd:20229XMLHttpRequest.send (async)ajaxSendNow @ zk.wpd:20293sendNow @ zk.wpd:20755onClick @ zk.wpd:22770fireX @ zk.wpd:17437doClick @ zk.wpd:25984_doEvt @ zk.wpd:19553(anonymous function) @ zk.wpd:19744dispatch @ zk.wpd:5157elemData.handle @ zk.wpd:4828

      use cases

      • users would want to switch the model template inside a Listbox with <apply>
      • multiple listboxes can inject the same template (reusability)

        Activity

        Hide
        wenninghsu wenninghsu added a comment -

        Fixed since 2017/03/31

        Show
        wenninghsu wenninghsu added a comment - Fixed since 2017/03/31
        Hide
        hawk hawk added a comment - - edited

        verified 8.0.5.FL.20170404-Eval with the original test case.

        current result

        Java exception occurred:

        2017-04-06 17:28:10 ERROR UiEngineImpl:1474 -
        java.lang.IllegalStateException: The insertion [<Listitem null>] of the shadow [<Apply@0 (<Listbox cIDP0#box1>)>] cannot be orphan
        at org.zkoss.zk.ui.HtmlShadowElement.getIndex(HtmlShadowElement.java:1164)
        at org.zkoss.zk.ui.HtmlShadowElement.inRange(HtmlShadowElement.java:1199)
        at org.zkoss.zk.ui.Templates.lookup(Templates.java:96)
        at org.zkoss.zk.ui.Templates.lookup(Templates.java:68)
        at org.zkoss.zk.ui.Templates.lookup(Templates.java:45)
        at org.zkoss.zuti.zul.Apply.lookupTemplate(Apply.java:151)
        at org.zkoss.zuti.zul.Apply.resolveTemplate(Apply.java:146)
        at org.zkoss.zuti.zul.Apply.compose(Apply.java:171)
        at org.zkoss.zk.ui.HtmlShadowElement.afterCompose(HtmlShadowElement.java:563)
        at org.zkoss.zuti.zul.TemplateBasedShadowElement.afterCompose(TemplateBasedShadowElement.java:78)
        at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:853)
        at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:822)
        at org.zkoss.zk.ui.impl.UiEngineImpl.access$800(UiEngineImpl.java:128)
        at org.zkoss.zk.ui.impl.UiEngineImpl$TemplateImpl.create(UiEngineImpl.java:2318)
        at org.zkoss.zul.impl.ListboxDataLoader$1.render(ListboxDataLoader.java:274)
        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:3740)
        at org.zkoss.zk.ui.impl.DesktopImpl.service(DesktopImpl.java:758)
        at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1310)
        at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:606)
        at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:482)
        at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:490)

        Show
        hawk hawk added a comment - - edited verified 8.0.5.FL.20170404-Eval with the original test case. current result Java exception occurred: 2017-04-06 17:28:10 ERROR UiEngineImpl:1474 - java.lang.IllegalStateException: The insertion [<Listitem null>] of the shadow [<Apply@0 (<Listbox cIDP0#box1>)>] cannot be orphan at org.zkoss.zk.ui.HtmlShadowElement.getIndex(HtmlShadowElement.java:1164) at org.zkoss.zk.ui.HtmlShadowElement.inRange(HtmlShadowElement.java:1199) at org.zkoss.zk.ui.Templates.lookup(Templates.java:96) at org.zkoss.zk.ui.Templates.lookup(Templates.java:68) at org.zkoss.zk.ui.Templates.lookup(Templates.java:45) at org.zkoss.zuti.zul.Apply.lookupTemplate(Apply.java:151) at org.zkoss.zuti.zul.Apply.resolveTemplate(Apply.java:146) at org.zkoss.zuti.zul.Apply.compose(Apply.java:171) at org.zkoss.zk.ui.HtmlShadowElement.afterCompose(HtmlShadowElement.java:563) at org.zkoss.zuti.zul.TemplateBasedShadowElement.afterCompose(TemplateBasedShadowElement.java:78) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:853) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:822) at org.zkoss.zk.ui.impl.UiEngineImpl.access$800(UiEngineImpl.java:128) at org.zkoss.zk.ui.impl.UiEngineImpl$TemplateImpl.create(UiEngineImpl.java:2318) at org.zkoss.zul.impl.ListboxDataLoader$1.render(ListboxDataLoader.java:274) 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:3740) at org.zkoss.zk.ui.impl.DesktopImpl.service(DesktopImpl.java:758) at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1310) at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:606) at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:482) at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:490)
        Hide
        wenninghsu wenninghsu added a comment -

        non-ROD case fixed since 2017/04/14

        Show
        wenninghsu wenninghsu added a comment - non-ROD case fixed since 2017/04/14

          People

          • Assignee:
            christopherszu christopherszu
            Reporter:
            hawk hawk
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 1 day, 1 hour, 5 minutes
              1d 1h 5m