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

save binding to an array throws ClassCastException

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 6.5.4
    • Fix Version/s: 6.5.5
    • Component/s: Databind 2
    • Security Level: Jimmy

      Description

      this fiddle http://zkfiddle.org/sample/skqfup/4-Array-binding-bug#source-1 demonstrates a simple case to reproduce this

      The values are loaded correctly, but saving them fails, throwing this exception (trying to convert the array index into a property name)

      Caused by: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String
      at org.zkoss.bind.xel.zel.BindELResolver.tieValue(BindELResolver.java:168)
      at org.zkoss.bind.xel.zel.BindELResolver.setValue(BindELResolver.java:105)
      at org.zkoss.zel.impl.parser.AstValue.setValue(AstValue.java:249)
      at org.zkoss.zel.impl.ValueExpressionImpl.setValue(ValueExpressionImpl.java:247)
      at org.zkoss.xel.zel.ELXelExpression.setValue(ELXelExpression.java:50)
      at org.zkoss.bind.impl.BindEvaluatorXImpl.setValue(BindEvaluatorXImpl.java:58)
      ... 34 more

        Attachments

          Activity

            People

            • Assignee:
              Jenkins Jenkins
              Reporter:
              cor3000 cor3000
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: