Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-17760

Cannot pass array values to JSONServiceAction

    Details

      Description

      This is meant to fix the portal JSONServiceAction.getArgValue method. Right now there is no way of passing array values from javascript to this service. For instance:

      serviceQueryObj = {
      groupIds: "11052,11523",
      ages: "15,20,30"
      /* whatever array values */
      };

      Since this is the object that serves the request with the service parameter values and it's a javascript map, we cannot put more than one value with the same key in the request. The following example wouldn't work:

      serviceQueryObj = {
      groupId: 11052,
      groupId, 11523,
      age: 15,
      age: 20,
      age: 30
      };

      If we use ParamUtil.getLongValues(request, "groupId"), we would only get:

      groupId - 11523

      This happens because using maps we can only pass one value per key, so there's no way of taking advantage of the request.getParameterValues method which is used by each ParamUtil.get[Type]Values methods. Thus we need a way of passing array values from javascript to the server.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bruno.basto Bruno Basto (Inactive)
              Reporter:
              bruno.basto Bruno Basto (Inactive)
              Participants of an Issue:
              Recent user:
              Esther Sanz
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                9 years, 47 weeks, 1 day ago

                  Packages

                  Version Package
                  6.0.12 EE
                  6.1.0 CE RC1