message-bundle

How can I get a message bundle string from inside a managed bean?

。_饼干妹妹 提交于 2019-11-27 07:26:25
I would like to be able to retrieve a string from a message bundle from inside a JSF 2 managed bean. This would be done in situations where the string is used as the summary or details parameter in a FacesMessage or as the message in a thrown exception. I want to make sure that the managed bean loads the correct message bundle for the user's locale. It is not clear to me how to do this from a managed bean using JSF API calls. My configuration is: Using Tomcat 7 as the container so the solution cannot depend on API calls that only work in a full application server container Using the JSF 2

How can I get a message bundle string from inside a managed bean?

我的梦境 提交于 2019-11-26 13:09:35
问题 I would like to be able to retrieve a string from a message bundle from inside a JSF 2 managed bean. This would be done in situations where the string is used as the summary or details parameter in a FacesMessage or as the message in a thrown exception. I want to make sure that the managed bean loads the correct message bundle for the user\'s locale. It is not clear to me how to do this from a managed bean using JSF API calls. My configuration is: Using Tomcat 7 as the container so the