Originally posted by Gregg Bolinger:
If you could explain a bit more about what the app does, it would help. When I started reading your post I was thinking you just needed to store User data. Like a logged in user. Which a session is perfect for. But as I continued to read, I realized you are just talking about form data.
I keep general form data in request scope throughout all my apps, JSF or not. And I don't find it quite as complicated as you are making it out to be. What about these forms are you needing to persist the whole time a user is on your site? I am a bit confused.
Yes, usually it is easy. However, I am working on a more complex app where there are no navigation rules, everything is handled by one class, which calls a service layer which talks to a
soap web service which tells the jsf class which components to create. All the components I have are created in
java code, since every aspect of the UI is generic. I have a bunch of tabs at the top of the UI, not jsf, so the first thing I need in session scope is the id of which screen I am currently on. Second, I display data in a 3rd party grid, where I have implemented custom pagination. The soap service caches data on its end and gives me a cache id. So when I go to, say, page two, I need to send the cacheId. So this is something else I need to keep through multiple requests. Also, a boolean which signals whether or not to use the cache, and which page I am currently on. Sorting is custom as well. It sends a new request to the soap service to get the sorted data. So I keep track of which sorting method to use as well, ascending or descending. The sorting is done via an ajax call, and I need to store the sorting options away so that other areas of the code may access them later. So there may be multiple requests while still on the same screen (there is not always a form submit). So as you can see it is not just form data.
[ September 15, 2006: Message edited by: peter black ]