Uploaded image for project: 'Tapestry'
  1. Tapestry
  2. TAPESTRY-525

Link components should not render during rewind in portlet mode

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: 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

        Hide
        phtouz 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
        phtouz 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.
        Hide
        jkuhnert Jesse Kuhnert added a comment -

        Patch applied, thank you.

        Show
        jkuhnert Jesse Kuhnert added a comment - Patch applied, thank you.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development