-
1. Re: keepalive only after restore view
ronanker Dec 9, 2010 4:22 AM (in response to ronanker)Román W. contacted me through Facebook and said :
I also need to have a keep-alived bean for restore view phase. Have you find any solutions for that? If yes, could you please give me a hand with this? Thanks in advance!! (And sorry if I made mistakes in this message, my English is in version beta.) Román. »Hi Roman,
I think my e-mail is in my Jboss Comunity profile, and if the question is about this post, you just have to reply to it and i receive a notification.
The solution we found was to code our own keepalive component, but i won't be able to give you all the details of its implementation.
we made a KeepAliveManager that handle two kind of keepalive : 'view' and 'session'...
inside the KeepAliveComponent restoreState() we restore the kept-alive object from the view // in saveState() we store in the view.
we use a PhaseListener and during beforePhase PhaseId.RESTORE_VIEW we restore the kept-alive object from the session.
inside our class we can call keepAlive into session (generally when we know that we'll navigate to a page with a 'redirect').
good luck for your dev,
note : I think there's no longer any problem with that in JSF 2.0, but I can't be sure as i haven't migrated yet.
Ronan.