Description
Currently the Portlet 2.0 Bridge runs the resource lifecycle (when targeting a Faces view to provide the resource) using the same scope as the view which generated the resource target. (Use case: A Faces view that has JSP/Java code that generates an iFrame with a source (target) of a Faces viewId). In doing so the resource view overwrites the main Views scope. Since things like the ViewStateParam are held here – on a subsequent redisplay the outer view displays the results of view that was in the iFrame (and the frame is lost). To avoid this the bridge should recognize that the Faces view that is the target of the resource is different from the one in scope/used to rener the portlet main view and establish a new separate scope for use. This scope should be managed as a child of the main scope ensuring it can be cleaned up if the main scope goes away.