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

error when saving nested form property

XMLWordPrintable

    • None

      Steps to Reproduce

      run the attached example
      click the save button

      Actual Result

      Exception:

      org.zkoss.zel.PropertyNotFoundException: Property 'level2level3' not found on type zk.support.NestedFormValidationVM$Level1_$$_jvst920_0
      	at org.zkoss.zel.BeanELResolver$BeanProperties.get(BeanELResolver.java:426)
      	at org.zkoss.zel.BeanELResolver$BeanProperties.access$300(BeanELResolver.java:376)
      	at org.zkoss.zel.BeanELResolver.property(BeanELResolver.java:549)
      	at org.zkoss.zel.BeanELResolver.getValue(BeanELResolver.java:101)
      	at org.zkoss.zel.CompositeELResolver.getValue(CompositeELResolver.java:66)
      	at org.zkoss.zel.CompositeELResolver.getValue(CompositeELResolver.java:66)
      	at org.zkoss.xel.zel.XelELResolver.getValue(XelELResolver.java:99)
      	at org.zkoss.bind.xel.zel.BindELResolver.getValue(BindELResolver.java:121)
      	at org.zkoss.zel.impl.parser.AstValue.getValue(AstValue.java:188)
      	at org.zkoss.zel.impl.ValueExpressionImpl.getValue(ValueExpressionImpl.java:184)
      	at org.zkoss.zkmax.bind.impl.ValueExpressionImplEx.getValue(ValueExpressionImplEx.java:52)
      	at org.zkoss.xel.zel.ELXelExpression.evaluate(ELXelExpression.java:41)
      	at org.zkoss.zkmax.bind.impl.BindEvaluatorXImplEx$LazyBindXelExpression.evaluate(BindEvaluatorXImplEx.java:124)
      	at org.zkoss.bind.impl.BindEvaluatorXImpl.getValue(BindEvaluatorXImpl.java:46)
      	at org.zkoss.bind.impl.SaveFormBindingImpl.getValidates(SaveFormBindingImpl.java:185)
      	at org.zkoss.bind.impl.ValidationHelper.collectSaveFormBinding(ValidationHelper.java:252)
      	at org.zkoss.bind.impl.ValidationHelper.collectSaveFormAfter(ValidationHelper.java:116)
      	at org.zkoss.bind.impl.ValidationHelper.collectSaveAfter(ValidationHelper.java:98)
      	at org.zkoss.bind.impl.BinderImpl.doValidate(BinderImpl.java:1929)
      ...
      

      Expected Result

      no exception, save the value to the field

      Debug Info

      The example uses a formbinding around a 3 level nested object

      Root Cause

      https://github.com/zkoss/zk/blob/884e074c3ab999798dcf38b01564ec1f4c940818/zkbind/src/org/zkoss/bind/proxy/ProxyHelper.java#L261

      missing '.' when concatenating the property path elements

            DevChu DevChu
            cor3000 cor3000
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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