portletspec3
  1. portletspec3
  2. PORTLETSPEC3-9

Errata: Clarification needed for method MimeResponse.createRenderURL

    Details

      Description

      The description contains a statement that I believe to be incorrect. It states:

      "The created URL will per default not contain any parameters of the current render request."

      However, the created URL I believe must contain any public render parameters that were set on
      the request. Also, the term "current render request" may be misleading. What is meant is the
      request that is being executed when the URL is created.

      So I would propose the following update:

      Original:
      -------------------------
      createRenderURL

      PortletURL createRenderURL()

      Creates a portlet URL targeting the portlet. If no portlet mode, window state or security modifier is set in the PortletURL the current values are preserved. If a request is triggered by the PortletURL, it results in a render request.

      The returned URL can be further extended by adding portlet-specific parameters and portlet modes and window states.

      The created URL will per default not contain any parameters of the current render request.

      Returns:
      a portlet render URL
      -------------------------

      Corrected:
      -------------------------
      createRenderURL

      PortletURL createRenderURL()

      Creates a portlet URL targeting the portlet. If no portlet mode, window state or security modifier is set in the PortletURL the current values are preserved. If a request is triggered by the PortletURL, it results in a render request.

      The returned URL can be further extended by adding portlet-specific parameters and portlet modes and window states.

      The created URL will per default contain only the public render parameters from the request
      being executed when the render URL is created.

      Returns:
      a portlet render URL
      -------------------------

      The same change should be made for the MimeResponse.createActionURL method.

        Activity

        Hide
        Neil Griffin added a comment -

        Recommend using either "The new" or "The returned" in a consistent manner. Currently both terms are used very close together, though they refer to the same thing.

        Also, the general term "render parameter" is meaningful when it refers to either Public/Private Render Parameters that the portlet developer has explicitly set via StateAwareResponse.setRenderParameter(String name, String value). These are parameters that are set in the ACTION_PHASE/EVENT_PHASE and intended to survive into the RENDER_PHASE.

        However I think that the general term "render parameters" becomes vague/ambiguous when referring to parameters set on a URL. While it is true that a Public Render Parameter can be set on a URL, I don't think we can precisely say Private Render Parameters can be set on a URL. Rather, they are simply Private Parameters (not Private Render Parameters) when set on a URL.

        Because of this, I would recommend that the following sentence be clarified or perhaps not added:

        Any parameter added to the render URL is automatically a render parameter.

        Show
        Neil Griffin added a comment - Recommend using either "The new" or "The returned" in a consistent manner. Currently both terms are used very close together, though they refer to the same thing. Also, the general term "render parameter" is meaningful when it refers to either Public/Private Render Parameters that the portlet developer has explicitly set via StateAwareResponse.setRenderParameter(String name, String value). These are parameters that are set in the ACTION_PHASE/EVENT_PHASE and intended to survive into the RENDER_PHASE. However I think that the general term "render parameters" becomes vague/ambiguous when referring to parameters set on a URL. While it is true that a Public Render Parameter can be set on a URL, I don't think we can precisely say Private Render Parameters can be set on a URL. Rather, they are simply Private Parameters (not Private Render Parameters) when set on a URL. Because of this, I would recommend that the following sentence be clarified or perhaps not added: Any parameter added to the render URL is automatically a render parameter.
        Hide
        msnicklous added a comment -

        Hi Neil,

        I tried to be precise in my use of the term "render parameter" - that's (supposed to be) part of the actual clarification. I believe that parameters set on a render URL are actually render parameters, since clicking on a render URL will result in a render request. In the descriptions of createActionURL & createResourceURL, I used the terms "action parameters" and "resource parameters" correspondingly.

        Show
        msnicklous added a comment - Hi Neil, I tried to be precise in my use of the term "render parameter" - that's (supposed to be) part of the actual clarification. I believe that parameters set on a render URL are actually render parameters, since clicking on a render URL will result in a render request. In the descriptions of createActionURL & createResourceURL, I used the terms "action parameters" and "resource parameters" correspondingly.
        Hide
        msnicklous added a comment -

        Updated Javadoc comments on URL creation methods in MimeResponse.

        Show
        msnicklous added a comment - Updated Javadoc comments on URL creation methods in MimeResponse.
        Hide
        Neil Griffin added a comment -

        @Scott: Thanks for the clarification. Sounds good.

        Show
        Neil Griffin added a comment - @Scott: Thanks for the clarification. Sounds good.
        Hide
        msnicklous added a comment -

        changes reviewed on 6 Aug 2013

        Show
        msnicklous added a comment - changes reviewed on 6 Aug 2013

          People

          • Assignee:
            msnicklous
            Reporter:
            msnicklous
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: