Jetspeed 2
  1. Jetspeed 2
  2. JS2-949

Portlet 2.0 optional feature support: head contribution

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2-M1
    • Fix Version/s: 2.2.0
    • Component/s: None
    • Labels:
      None

      Description

      • To provide more optimized way handling DOM element for head contribution element.
      • Page aggregators should aggregate head elements to be contributed to the page
      • Portal pipeline acts as non-streaming portal implementation,
        while Desktop pipeline acts as streaming portal implementation.
      • In Desktop pipeline, as a streaming portal, the portal will invoke render() method twice: one for head elements and the other for rendering markups.
      • AJAX desktop implementations should be slightly changed to adapt itself to this change.

        Activity

        Hide
        Woonsan Ko added a comment -

        Done.

        Brief explanation:

        • Jetspeed 2.2 will always behave as a buffering portal implementation for both portal pipeline and desktop pipeline.
          (I thought that desktop pipeline should behave as a streaming portal, but it turned out to be able to use buffering solution as well.)
        • A portlet can contribute any element in the head of the page by using standard API (createElement(), addProperty(MimeResponse.MARKUP_HEAD_ELEMENT, element)).
        • Jetspeed keeps the insertion order of head elements contributed by a portlet in both portal pipeline and desktop pipeline.
          (For example, if a portlet adds a script block, A, followed by another script block, B, then Jetspeed guarantees script block A is prior to script block B.)
        • Jetspeed include just one head element if there are multiple elements with same ID. That is, if a head element is contributed with ID attribute, then the ID attribute is used by Jetspeed for this purpose.
          (For example, if a script element with ID='dojo' is contributed by a portlet and another script element with same ID='dojo' is contributed by another portlet, then Jetspeed will include only one element.)
          If a contributed head element does not have ID attribute, then the element will be stringified to generate an ID for the element.

        By the way, the old Jetspeed interfaces and head aggregation components should be refactored to comply with Portlet 2.0 spec.
        I will create a new JIRA issue for this problem and for migration of the existing portlets based on the old APIs.

        Show
        Woonsan Ko added a comment - Done. Brief explanation: Jetspeed 2.2 will always behave as a buffering portal implementation for both portal pipeline and desktop pipeline. (I thought that desktop pipeline should behave as a streaming portal, but it turned out to be able to use buffering solution as well.) A portlet can contribute any element in the head of the page by using standard API (createElement(), addProperty(MimeResponse.MARKUP_HEAD_ELEMENT, element)). Jetspeed keeps the insertion order of head elements contributed by a portlet in both portal pipeline and desktop pipeline. (For example, if a portlet adds a script block, A, followed by another script block, B, then Jetspeed guarantees script block A is prior to script block B.) Jetspeed include just one head element if there are multiple elements with same ID. That is, if a head element is contributed with ID attribute, then the ID attribute is used by Jetspeed for this purpose. (For example, if a script element with ID='dojo' is contributed by a portlet and another script element with same ID='dojo' is contributed by another portlet, then Jetspeed will include only one element.) If a contributed head element does not have ID attribute, then the element will be stringified to generate an ID for the element. By the way, the old Jetspeed interfaces and head aggregation components should be refactored to comply with Portlet 2.0 spec. I will create a new JIRA issue for this problem and for migration of the existing portlets based on the old APIs.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development