myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Blake Sullivan <>
Subject Re: PageFlowScopeProvider development request
Date Fri, 06 Aug 2010 18:12:56 GMT

I believe that what you really need is a default WindowManager 
implementation in Trinidad.  When a WindowManager is present, Trinidad 
will store the view state under the windows and the view state can be 
cleaned up when the window is closed.

-- Blake Sullivan

On 7/27/10 9:24 PM, Mark Badorrek wrote:
> Developers,
> I have a Trinidad application that has a few independant frames that operate in a non-modal
fashion (The client needs tha app to work this way). All frames extensively use 'PageFlowScope'.
> Now PageFlowScope works well if you have a single frame, but gives no end of grief if
you have multipe frames. This can be explained:
> Every time a user clicks on a page, Trinidad creates another viewstate object and shoves
it onto the pageflowscope map. The map is stored in the HTTP session and is not limitless.
You set the size of the map in web.xml. Once you start adding viewstates to an already-full
map, the map starts discarding the oldest viewstates. Ususally this is not a problem (how
many times could a user be expected to click the 'Back' button?) But if you have multiple
frames, the user could spend 30minutes clicking in frame 'B', whilst the current viewstate
of frame 'A' becomes older and older and eventually gets pushed out of the viewstate map.
The the user clicks on frame 'A', the viewstate is not found and everything falls in a smoking
> You can get around this by specifying a huge map-size in web.xml but this results in
spectacular memory wastage for no really good reason.
> An alternative is to implement a new pageFlowScopeProvider that keeps separate maps for
each frame. Trinidad does not have one of these out-of-the-box, but I have written one for
my client. The problem is that it would be better to imlement this as a general solution in
Trinidad so that others may benefit (and also that my client doesn't have to maintain it).
> I've not been involved in the project for a while but I'd like to get a solution in place
for my client. Is there a preferred method to avoid the above problem? Or should the custome
PageFlowScopeProvider be pursued?
> If the reccomendation is to pursue a custom pageFlowScopeProvider, my client (a government
client) is happy to enter into a commercial arangement with a committer here. i.e. they will
pay for a solution. Either to yourself of the Apache foundation etc. My code is available
if it helps.
> Cheers,
> MarkB
> ********************************************************
> The information in this e-mail is intended for the named recipient only.
> It may contain privileged and/or confidential information. If you are not the intended
recipient, you must not disclose, copy, distribute, take any action or reliance on it.  If
you have received this e-mail in error, please notify the sender immediately and delete this
> Warning: E-mail transmission cannot be guaranteed to be secure or error-free. The recipient
should check this email and any attachments for the presence of viruses. The sender does not
accept liability for any errors or omissions in the contents of this message.
> ********************************************************

View raw message