Window manager and per window page flow scope
---------------------------------------------
Key: TRINIDAD-1903
URL: https://issues.apache.org/jira/browse/TRINIDAD-1903
Project: MyFaces Trinidad
Issue Type: New Feature
Affects Versions: 1.2.14-core
Reporter: Michael Kurz
Priority: Minor
Some time ago Mark Badorrek posted a development request for a
PageFlowScopeProvider that supports having one page flow scope and one view
cache for every window /tab of the browser. The original request explaining the
problem can be found at [1]. Mark has a working solution for this problem that
supports five hardcoded page flow scopes and view caches (details below).
What he wants to have is a generic solution that comes as part of Trinidad.
Blake suggested that this should be done with a window manager implementation.
I started working on this and provide some very basic code to discuss the
problems involved.
Details for the existing solution:
-------------------------------------------
Mark's existing solution mainly consists of a custom page flow scope provider
implementation. This implementation supports a default page flow scope map and
five additional scope maps with predefined names. The names are supplied via
request parameters.
Additionally, they have a custom state manager that also checked the request
parameters and store a separate view cache for each of the five named windows
(including a default view cache).
The following scenario demonstrates how this solution is used. If the user
clicks on a link, a new window using a new page flow scope and view cache is
opened. The JSP fragment looks like this:
<tr:goLink textAndAccessKey="..." destination="#"
onclick="window.open( '#{myBackingBean.getURL}', '...'"/>
public class MyBackingBean{
public void getURL(){
Map<String, Object> pageFlowScope = ThePageFlowProviderImpl.
getEmptyPageFlowScopeForRelatedWorkItems();
// Initialize some stuff and put it in the new page flow scope
pageFlowScope.put("key", value);
return "../my/new/frame.jsp?" + ThePageFlowProviderImpl.
RELATED_WORK_ITEMS_PAGE_FLOW_SCOPE + "=true";
}
}
Effectively the URL assigned to the goLink tag becomes :
../my/new/frame.jsp?relatedworkitems_pageflowscope=true
Once trinidad opens the new window and begins to create the view, it eventually
starts using the new page flow scope defined by the magic key in the URL
("relatedworkitems_pageflowscope") to determine which pageflowscope to use.
---
[1]: http://markmail.org/message/ijyve7oj2ik5l57k
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.