Section 5.1.2 of the JSR 329 Spec titled "Managing Lifecycle State" states:
Specifically, the bridge must implement a notion of a "bridge request scope" (scoped data) that supplies the expected Faces semantics. This is done as follows:
- Upon completion of each portlet action preserve the scoped data (described above) in a newly created bridge request scope if the action doesn't terminate because of a redirect or the navigational target of the action doesn't specify a portlet mode that differs from the current request.
This can be represented by the following snippet from BridgePhaseActionImpl.java in the Liferay Faces Bridge Reference Implementation:
The problem in the Spec requirement should use the word "and" instead of "or".
Rationale: If ExternalContext.redirect(String url) is called by the bridge due to the presence of a <redirect/> in a navigation-rule, then the bridge request scope must not be preserved into the render phase. Even if the PortletMode is the same, the bridge request scope must not be preserved when a redirect occurs.
Note that redirectActionTest and requestNoScopeOnRedirectTest in Bridge TCK have the correct understanding. In other words, the Bridge TCK assumes "and" and not "or" which means that the Spec language must be in error.