Tapestry
  1. Tapestry
  2. TAPESTRY-525

Link components should not render during rewind in portlet mode

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0
    • Fix Version/s: 4.0.1
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      Tapestry 4.0 beta 3, Jetspeed 2.0-M3

      Description

      When running as a portlet, there is no way to generate a link during the processAction() phase, that is the rewind phase.
      When a Link component attempts to render its link during rewind, the PortletLinkFactoryImpl crashes because _renderResponse is null.

      One solution is to change the renderComponent() method of AbstractLinkComponent:

      protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle)

      { + if (cycle.isRewinding()) + return; getRenderer().renderLink(writer, cycle, this); }

      Not quite sure about the side effects...

        Activity

        Raphael Jean created issue -
        Hide
        Raphael Jean added a comment -

        Here is a patch for DefaultLinkRenderer, ButtonLinkRenderer and related junit tests. It disables the link during rewind so that the body of the link is rendered but not the link itself. This is better than just skipping rendering altogether during rewind as previously mentioned.

        Show
        Raphael Jean added a comment - Here is a patch for DefaultLinkRenderer, ButtonLinkRenderer and related junit tests. It disables the link during rewind so that the body of the link is rendered but not the link itself. This is better than just skipping rendering altogether during rewind as previously mentioned.
        Raphael Jean made changes -
        Field Original Value New Value
        Attachment TAPESTRY-525-patch.txt [ 12323860 ]
        Jesse Kuhnert made changes -
        Assignee Jesse Kuhnert [ jkuhnert ]
        Hide
        Jesse Kuhnert added a comment -

        Patch applied, thank you.

        Show
        Jesse Kuhnert added a comment - Patch applied, thank you.
        Jesse Kuhnert made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 4.0.1 [ 12310670 ]
        Resolution Fixed [ 1 ]
        Mark Thomas made changes -
        Workflow jira [ 12322998 ] Default workflow, editable Closed status [ 12567396 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12567396 ] jira [ 12591945 ]

          People

          • Assignee:
            Jesse Kuhnert
            Reporter:
            Raphael Jean
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development