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

ZK EL bug. Shows up with ZK 6 new bind system, but it seems a general issue

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • None
    • 6.0.0, 6.0.1
    • Databind 2, General
    • All

      Bug in BeanELResolver

      Using the new ZK 6 bind system a have the following error:

      10:58:30,690 GRAVE [org.zkoss] (http-localhost-127.0.0.1-8080-3) >>java.lang.ArrayIndexOutOfBoundsException: 1
      >> at org.zkoss.zel.BeanELResolver.invoke(BeanELResolver.java:523)
      >> at org.zkoss.zel.CompositeELResolver.invoke(CompositeELResolver.java:161)
      >> at org.zkoss.zel.CompositeELResolver.invoke(CompositeELResolver.java:161)
      >> at org.zkoss.xel.zel.XelELResolver.invoke(XelELResolver.java:148)
      ...
      I attach the full stack trace, also a sample zul and a view model to reproduce it.

      The problem seems to be when a converter is searched on the view model object. If this object hasn't a getConverter(), and has a method with only one argument of type vararg (any name), it fails.

      As a workarround i declared this on my view model:

      public Converter<?, ?, ?> getConverter(String name)

      { return null; }

      Or you can remove any method with only one arg of type vararg

      Anyway the problem in the EL seems to be generic.

        1. stacktrace.txt
          5 kB
        2. test.zul
          0.2 kB
        3. testVM.java
          0.2 kB

            iantsai iantsai
            msrednsi msrednsi
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: