[
https://issues.apache.org/jira/browse/PORTLETBRIDGE-33?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael Freedman resolved PORTLETBRIDGE-33.
-------------------------------------------
Resolution: Fixed
Fix Version/s: 1.0.0
Applied attached patch file to fix the problem -- I merely remove the redirect
request attr before returning from the action. Fix has also been carried
forward into the 2.0 codeline but not yet committed.
> Redirect during action causes infinite loop if action/render run in same
> request
> --------------------------------------------------------------------------------
>
> Key: PORTLETBRIDGE-33
> URL: https://issues.apache.org/jira/browse/PORTLETBRIDGE-33
> Project: MyFaces Portlet Bridge
> Issue Type: Bug
> Components: Impl
> Affects Versions: 1.0.0-alpha, 1.0.0-alpha-2, 1.0.0, 2.0.0
> Reporter: Michael Freedman
> Assignee: Michael Freedman
> Fix For: 1.0.0
>
>
> Redirect (of a Faces view) during an action is caught by the bridge and
> turned into a simple navigation -- I.e. we view such a redirect as meaning
> change the view of the this portlet NOT change the view of the browser from
> the consumer page. Its impelmented by tacking a request attribute on in the
> redirect method and then detecting this attr in the lifecycle
> manager/controller (doFacesRequest). If a redirect is detected we return
> normally but don't preserve state. However the code doesn't remove the
> redirect request attribute. If the portlet container turns around and calls
> render in the same request scope the attr still exists. And as we upgraded
> the render impl to also detect/support such redirects, the carrying forward
> of this attribute causes the render to also think it now needs to do one of
> these navigational redirects -- and the by product of executing this causes
> us to rerun the render with the same request attributes as the render started
> with -- but oops this already contained the redirect attr carried forward
> from the action -- so we get into an infinite loop.
> Solution is simple: merely remove the request attr before returning from the
> action.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.