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

ZK bind ChildrenBinding fail to convert one object to a list

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Normal
    • 6.0.1
    • 6.0.0
    • Databind 2
    • None

    Description

      LoadChildrenBindingImpl at line 50. It trys to automatically convert a single object to a List with Classes.coerce(List.class, value).

      This will cause NoSuchMethodException since List.class is an interface, no way to find a constructor.

      >>java.lang.NoSuchMethodException: java.util.List: no constructor for [org.zkoss.zktest.bind.basic.Book@2d9b4fac]
      >> at org.zkoss.lang.Classes.newInstance(Classes.java:97)
      >> at org.zkoss.lang.Classes.coerce(Classes.java:1437)
      >> at org.zkoss.bind.impl.LoadChildrenBindingImpl.load(LoadChildrenBindingImpl.java:50)
      >> at org.zkoss.bind.impl.ChildrenBindingHandler.doLoadBinding(ChildrenBindingHandler.java:116)
      >> at org.zkoss.bind.impl.ChildrenBindingHandler.doLoad(ChildrenBindingHandler.java:176)
      >> at org.zkoss.bind.impl.BinderImpl.loadComponentProperties(BinderImpl.java:1818)
      >> at org.zkoss.bind.impl.BinderImpl.loadComponent(BinderImpl.java:1795)
      >> at org.zkoss.bind.tracker.impl.BindUiLifeCycle$1.onEvent(BindUiLifeCycle.java:63)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              henrichen henrichen
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: