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

SelectEvent.getSelectEvent fails converting String to List

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 5.0.3
    • Fix Version/s: None
    • Component/s: ZK Update Engine
    • Labels:
      None

      Description

      https://sourceforge.net/tracker/?func=detail&aid=3049263&group_id=152762&atid=785191

      data.get("items") returns selected item's id instead of a list of items

      The method is: org.zkoss.zk.ui.event.SelectEvent.getSelectEvent(AuRequest request)

      and the peace of code:
      return new SelectEvent(request.getCommand(), comp,
      AuRequests.convertToItems(desktop, (List)data.get("items")),
      desktop.getComponentByUuidIfAny((String)data.get("reference")),
      AuRequests.parseKeys(data));

      This only happened to me when the .zul file was included with servletContext.getRequestDispatcher(path).include(request, response); Otherwise works perfectly.

      Checking whether data.get("items") is a String and convert it into a single item list would be a solution.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            asukachen asukachen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: