hi radu, as mentioned before: > once we have at least something similar to the window-handling of codi, it's just about some lines of code
we just have to agree on #2 or #3 before we can start with it. regards, gerhard 2012/11/21 Radu Creanga <[email protected]> > Hello everyone, > > Gerhard, you're right, it's way simpler than that. I looked over the > rules again like you suggested and sure I was complicating things. > > So, the rules: > > 1. A @ViewScoped bean will live as long as you're submitting the form > to the same view again and again. In other words, as long as when the > action method(s) returns null or even void, the bean will be there in > the next request. Once you navigate to a different view, then the bean > will be trashed. > > For this we can continue to rely on JSF events, or use a navigation > observer like in #3. > > 2. The case when that event is not fired is when the session expires > but no navigation has been performed. For example, 2 get requests to > the same URL will result in the view for the first request to never > get cleaned up. > > For this, a session bean would be enough. > > The implementation currently present in DS destroys instances in 1, > but not in 2. So, assuming these are the only requirements, the > attached patch adds support for 2 (using a session bean, no weak > references or anything like that.). > > Anyhow, this may not be what you all are looking for but it is quite > simple and working (basically #1). > > Gerhard, I considered both #2 and #3, and I understand how it would > work given your article and reading documentation. But, I don't yet > have a good grasp of the code base to implement them. I'll continue > looking into it, maybe something good comes out. > > Happy Thanksgiving to all the people who celebrate it tomorrow. :) > > Radu Creanga
