5 Replies Latest reply on Dec 27, 2011 11:05 PM by Lu Han

    Bean is recreated after page is loaded

    Nikolai Alexeev Newbie

      I've got problem with managed beans that are used on several pages with a4j:keepAlive. The situation is: i use bean MyBean on page1 as main bean (i.e. main table shows its data and there are some other beans that show dependent data) and it's also used on another page (page2) where i can go from page1, then when returning from page2 to page1 i restore the state of the bean by using saved to session data. The problem is that AFTER i restored data and page1 is shown as it was before i went to page2, MyBean for some reason is destroyed and created again. So i loose all my data that i restored and that is shown on the page: page1 becomes inconsistent as it shows data that doesn't present in its underlying bean. It happens both: with ajaxOnly="true" and without it. Why does it happen and how to deal with it?