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

ClassCastException: org.zkoss.zul.Listcell cannot be cast to org.zkoss.zul.Comboitem

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Normal Normal
    • None
    • 9.5.0.2
    • Components
    • None
    • Glassfish 5.1.0, OpenJDK 8

      Steps to Reproduce

      Sometimes, when selecting an item of a Combobox, a

      java.lang.ClassCastException: org.zkoss.zul.Listcell cannot be cast to org.zkoss.zul.Comboitem
      at org.zkoss.zul.Combobox.service(Combobox.java:990)
      at org.zkoss.zk.ui.impl.DesktopImpl.service(DesktopImpl.java:826)
      at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1318)
      at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:570)
      at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:450)
      at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:458)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:665)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:750)

      is thrown. The exact reason is not clear to me, it is a bit random but happens from time to time. It might be good to check before casting to Comboitem, but the real reason is probably on the Javascript side. As a result of the exception, the item clicked is not selected.

      Current Result

      Expected Result

      The item clicked should be selected, no error message should be displayed.

      Debug Information

            Unassigned Unassigned
            chemFelix chemFelix
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: