Hi everyone,
I try this mailing-list since I didn¹t get any sufficient answer anywhere
else:
(Versions: MyFaces API/Impl 1.15 and Tomahawk 1.1.6 with Tomcat 5.5)
I use request scope beans a lot as backing beans for JSF/MyFaces.
With my current approach I see a lot of ³sometimes errors² in the following
situation:
----
1. XHTML page using facelets and <t:saveState> where the current backing
bean (MyBean) of the page is stored (<t:saveState value="#{MyBean}" />
2. MyBean trying to access the UIViewRoot with the help of the FacesContext
in the constructor.
----
Now whenever I leave the page where the saveState is used, I get an "null"
result when requesting the UIViewRoot from the MyBean constructor.
I use the UIViewRoot to access a ResourceBundle to translate labels which
get loaded dynamically inside several page elements (OneSelectMenus and
SelectButtons). The error occurs if I try to saveState a backing bean which
is currently used by the active jsf page, which made me think :-/.
Any ideas? I already have the feeling the accessing the UIViewRoot in the
constructor is evil, but could not verify nor change this.
Marcello.