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

save binding to an array throws ClassCastException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 6.5.5
    • 6.5.4
    • Databind 2
    • Security Level: Jimmy
    • None

      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

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

              Created:
              Updated:
              Resolved: