Affects Version/s: 1.2
Fix Version/s: 1.0
Operating System: All
I really like the new Session state saving. However, I wonder if one more step
can be taken to make it just a bit better.
I have a situation where if I create a popup window that is using JSF and the
user navigates around the popup to many times then the state of the parent
window disappears off of the LRUMap making the parent window unusable when the
user closes the popup and attempts to use the parent window again. The same
could hold true for a frame too. If a user navigates inside of a frame too many
times then the outer frame will quickly become expired and unusable.
So, I was wondering if it might be a good idea to add a "window" aspect to the
state. So the viewMap becomes 2 dimensional with the viewâ€™s lru map existing
inside of another lru map for windows. When a response is rendered it creates a
new FACES_VIEW like it does now but if the response came from a request with an
existing windowId the view will be stored in the existing window's lru map.
Otherwise a new windowId is created and the view is stored in the new windowId.
This will allow for a more application specific utilization of server memory.
Currently if a developer wishes to have 2 JSF pages in frames he must set the
NUMBER_OF_VIEWS_IN_SESSION to a very high number to maintain the user
experience. But if views were associated with windows the developer could maybe
NUMBER_OF_VIEWS_IN_WINDOW = 3
NUMBER_OF_WINDOWS_IN_SESSION = 10
This will allow the user to go back 3 views in the current window before it
expires but would allow 10 brand new views to be created before the windows
Sure the number of Windows could run out quickly too if the other windows are
redirecting or creating new views often, but, at least the developer would be
able to tune their application more effectively to make such occurrences more rare.
I hope this makes sense.