First:
I have two Managed Beans.
Bean A:
- @ViewScope
- Contains a lazyloading datatable depending on some session value, initialized in the @PostConstruct
Bean B:
- @ViewScope
- Changing the session value which is used in Bean A
I do following;
- setting my session data with the JSF site using Bean B
- loading the jsf site which uses Bean A
- setting other session data with Bean B
- loading the jsf which uses Bean A again
The Problem is following:
If I am loading the JSF site with Bean A again, the PostConstruct which is initializing the datatable is not loaded again.
I thought that if I use the view scope, the ManagedBean would be destroyed if I navigate through different JSF sites.
Please help me to understand this Problem. What am I doing wrong?
@javax.faces.bean.ManagedBean
or something else? – BalusC