MyFaces 1.1.5, Tomcat 5.5

I currently use the following way to retrieve resource bundles:

FacesContext cont = FacesContext.getCurrentInstance();
UIViewRoot viewRoot = cont.getViewRoot();
Locale loc = viewRoot.getLocale();
labelsResource = ResourceBundle.getBundle("labels", loc);

This code is part of a CTOR of a request scoped backing bean.

It sometimes happens that the resource bundle returned from "getBundle" is 
"null".

Is there a better way to retrieve the bundle? Is the bundle-loading or 
view-root depending on a certain
render-phase?

If nobody has an idea I would try to post it as a bug, since it is reproducable 
behaviour.

Marcel

Reply via email to