Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-647 New Wicket Portlet support
  3. WICKET-650

New Wicket Portlet support: use a RequestContext for abstracted url generation, writing header response and namespacing

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.0-beta2, 1.3.0-beta3
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      To support rendering in a Portlet container, wicket needs to abstract the (final) url, markupId generation and writing the IHeaderResponse.

      I'm going to provide a new base RequestContext class which default implementation (for standard web application purposes) really doesn't do anything.

        Activity

        Hide
        adouma Ate Douma added a comment -

        As multiple portlets can live on one page, tag id's really need to be unique for each portlet to allow proper usage of Ajax and other dhtml features.

        The Portlet API provides the String RenderResponse.getNamespace() method for this, which returns a unique id for the current portlet (Window).

        The new RenderContext interface adds both a getNamespace() and a encodeMarkupId(String id) method which should be used for the final markupId generated and returned by Component.getMarkupId().

        Show
        adouma Ate Douma added a comment - As multiple portlets can live on one page, tag id's really need to be unique for each portlet to allow proper usage of Ajax and other dhtml features. The Portlet API provides the String RenderResponse.getNamespace() method for this, which returns a unique id for the current portlet (Window). The new RenderContext interface adds both a getNamespace() and a encodeMarkupId(String id) method which should be used for the final markupId generated and returned by Component.getMarkupId().
        Hide
        adouma Ate Douma added a comment -

        Abstracting Header response writing is handled by WICKET-651

        Show
        adouma Ate Douma added a comment - Abstracting Header response writing is handled by WICKET-651
        Hide
        adouma Ate Douma added a comment -

        Switching to a new 1.3.0-beta3-portlet-support branch.
        In the process of moving to this new branch, renamed RenderContext to RequestContext as it better reflects its purpose, so I also update this issue summary accordingly.

        Show
        adouma Ate Douma added a comment - Switching to a new 1.3.0-beta3-portlet-support branch. In the process of moving to this new branch, renamed RenderContext to RequestContext as it better reflects its purpose, so I also update this issue summary accordingly.
        Hide
        adouma Ate Douma added a comment -

        This now just works

        Show
        adouma Ate Douma added a comment - This now just works

          People

          • Assignee:
            adouma Ate Douma
            Reporter:
            adouma Ate Douma
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development