You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Raphael Jean (JIRA)" <ta...@jakarta.apache.org> on 2006/03/07 14:11:39 UTC

[jira] Updated: (TAPESTRY-525) Link components should not render during rewind in portlet mode

     [ http://issues.apache.org/jira/browse/TAPESTRY-525?page=all ]

Raphael Jean updated TAPESTRY-525:
----------------------------------

    Attachment: TAPESTRY-525-patch.txt

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.

> Link components should not render during rewind in portlet mode
> ---------------------------------------------------------------
>
>          Key: TAPESTRY-525
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-525
>      Project: Tapestry
>         Type: Bug
>   Components: Framework
>     Versions: 4.0
>  Environment: Tapestry 4.0 beta 3, Jetspeed 2.0-M3
>     Reporter: Raphael Jean
>  Attachments: TAPESTRY-525-patch.txt
>
> 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...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org