-
1. Re: Bean is recreated after page is loaded
shams.mali Dec 27, 2011 10:13 AM (in response to true_mykola)how are you navigating from page1 to 2. If you are redirecting then the bean will be loaded again as it is a new request. Make sure you are not using faces redirect.
-
2. Re: Bean is recreated after page is loaded
feuyeux Dec 27, 2011 10:39 AM (in response to true_mykola)The keepAlive is obsoleted from JSF2, and if your richfaces is 3.3.3+, please use ViewScoped annotation in javax.faces.bean.
Alse, please double check your bean's has been defined in the relevant pages.
i.e.:
@ManagedBean(name = "text")
@ViewScoped
public class TextBean
-
3. Re: Bean is recreated after page is loaded
true_mykola Dec 27, 2011 1:31 PM (in response to shams.mali)i'm navigating by usual jsf navigation rules via <navigation-case> without using </redirect>. Yes, the bean is destroyed but then on loading page1 (when returning from page2) i restore its values from session and it shows restored page but then again (after page is shown) it's been destroyed and i see a page but when i click on my entries they don't have information because bean was recreated. If just load page1 and do some actions on it bean isn't recreated so keepAlive works fine. Strange things happen only when returning from another page and restoring values.
-
4. Re: Bean is recreated after page is loaded
true_mykola Dec 27, 2011 1:33 PM (in response to feuyeux)Isn't @ViewScoped a JSF2 feature? We're using JSF 1.2 and richfaces 3.3.3.
-
5. Re: Bean is recreated after page is loaded
feuyeux Dec 27, 2011 11:05 PM (in response to true_mykola)Yes, it's belong to JSF2.
For your puzzle, I suggest using session scope to test, if there is no issue, please check the keepalive management of this bean.