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

lost variable in nested children-binding

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: Freshly, 7.0.6.1, 8.0.1
    • Fix Version/s: 8.0.1, 7.0.8
    • Component/s: Databind 2
    • Security Level: Jimmy
    • Labels:
    • gh.sprint.customfield.default.name:
      ZK 8.0.1 S1

      Description

      run the example in ZK 7 or 8
      http://zkfiddle.org/sample/3c5nmv/12-Issue-with-wrapped-Children

      the EL in Line 10 causes the Exception:

      org.zkoss.zel.PropertyNotFoundException: Property 'name' not found on type org.zkoss.bind.impl.ReferenceBindingImpl
      	at org.zkoss.zel.BeanELResolver$BeanProperties.get(BeanELResolver.java:299)
      	at org.zkoss.zel.BeanELResolver$BeanProperties.access$400(BeanELResolver.java:250)
      	at org.zkoss.zel.BeanELResolver.property(BeanELResolver.java:424)
      	at org.zkoss.zel.BeanELResolver.getValue(BeanELResolver.java:87)
      	at org.zkoss.zel.CompositeELResolver.getValue(CompositeELResolver.java:66)
      	at org.zkoss.xel.zel.XelELResolver.getValue(XelELResolver.java:72)
      	at org.zkoss.zel.impl.parser.AstValue.getValue(AstValue.java:178)
      	at org.zkoss.zel.impl.ValueExpressionImpl.getValue(ValueExpressionImpl.java:184)
      	at org.zkoss.xel.zel.ELXelExpression.evaluate(ELXelExpression.java:40)
      	at org.zkoss.zk.xel.impl.SimpleEvaluator.evaluate(SimpleEvaluator.java:72)
      	at org.zkoss.zk.ui.metainfo.AbstractEvalRef.evaluate(AbstractEvalRef.java:48)
      	at org.zkoss.zk.xel.ExValue.getValue(ExValue.java:109)
      	at org.zkoss.zk.ui.metainfo.Property.getValue(Property.java:134)
      	at org.zkoss.zk.ui.metainfo.Property.assign0(Property.java:227)
      	at org.zkoss.zk.ui.metainfo.Property.assign(Property.java:169)
      	at org.zkoss.zk.ui.metainfo.ComponentInfo.applyProperties(ComponentInfo.java:729)
      	at org.zkoss.zk.ui.impl.AbstractUiFactory.newComponent(AbstractUiFactory.java:106)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:857)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:826)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:735)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.access$800(UiEngineImpl.java:126)
      	at org.zkoss.zk.ui.impl.UiEngineImpl$TemplateImpl.create(UiEngineImpl.java:2231)
      	at org.zkoss.bind.impl.BindChildRenderer.render(BindChildRenderer.java:70)
      	at org.zkoss.bind.impl.InitChildrenBindingImpl.load(InitChildrenBindingImpl.java:87)
      	at org.zkoss.bind.impl.ChildrenBindingHandler.doLoadBinding(ChildrenBindingHandler.java:97)
      	at org.zkoss.bind.impl.ChildrenBindingHandler.doInit(ChildrenBindingHandler.java:166)
      	at org.zkoss.bind.impl.BinderImpl.loadComponentProperties0(BinderImpl.java:2203)
      	at org.zkoss.bind.impl.BinderImpl.loadComponent0(BinderImpl.java:2172)
      	at org.zkoss.bind.impl.BinderImpl.loadComponent(BinderImpl.java:2163)
      	at org.zkoss.bind.tracker.impl.BindUiLifeCycle$2.onEvent(BindUiLifeCycle.java:124)
      	at org.zkoss.zk.ui.AbstractComponent.onEvent(AbstractComponent.java:2773)
      	at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2722)
      	at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2685)
      	at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:136)
      	at org.zkoss.zk.ui.event.Events.sendEvent(Events.java:325)
      	at org.zkoss.zk.ui.event.Events.sendEvent(Events.java:348)
      	at org.zkoss.bind.impl.BindChildRenderer.render(BindChildRenderer.java:93)
      	at org.zkoss.bind.impl.InitChildrenBindingImpl.load(InitChildrenBindingImpl.java:87)
      	at org.zkoss.bind.impl.ChildrenBindingHandler.doLoadBinding(ChildrenBindingHandler.java:97)
      	at org.zkoss.bind.impl.ChildrenBindingHandler.doInit(ChildrenBindingHandler.java:166)
      	at org.zkoss.bind.impl.BinderImpl.loadComponentProperties0(BinderImpl.java:2203)
      	at org.zkoss.bind.impl.BinderImpl.loadComponent0(BinderImpl.java:2172)
      	at org.zkoss.bind.impl.BinderImpl.loadComponent0(BinderImpl.java:2177)
      	at org.zkoss.bind.impl.BinderImpl.loadComponent(BinderImpl.java:2163)
      	at org.zkoss.bind.BindComposer$BinderKeeper$Loader.load(BindComposer.java:502)
      	at org.zkoss.bind.BindComposer$BinderKeeper.loadComponentForAllBinders(BindComposer.java:481)
      	at org.zkoss.bind.BindComposer.doAfterCompose(BindComposer.java:181)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.doAfterCompose(UiEngineImpl.java:578)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:880)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:826)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:735)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:699)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage0(UiEngineImpl.java:442)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage(UiEngineImpl.java:356)
      	at org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:217)
      	at org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:136)
      

      -----------

      Workaround is to use @init or @load which can resolve the reference properly

        Attachments

          Activity

            People

            • Assignee:
              jumperchen jumperchen
              Reporter:
              cor3000 cor3000
            • Votes:
              0 Vote for this issue
              Watchers:
              2 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 - 6 hours
                6h