New utility methods for Faces class #57

julianomqs opened this Issue Sep 4, 2014 · 1 comment


None yet

2 participants


Add method in Faces class to get the ResourceBundle of the application, like:

ResourceBundle i18n = Faces.getResourceBundle("i18n");

Wish 1: It will be nice if I don't need to pass the bundle name as argument:

ResourceBundle i18n = Faces.getResourceBundle();

Since faces-config can have only one ResourceBundle (afaik).

Wish 2: Get the Messages bundle from application as a ResourceBundle:

ResourceBundle messagesBundle = Faces.getMessagesBundle();

Since the method FacesContext.getCurrentInstance().getApplication().getMessageBundle(); only returns a String.

@BalusC BalusC closed this in 383b1dc Sep 4, 2014
BalusC commented Sep 4, 2014

Done. Check today's 2.0 snapshot.

The Faces#getMessageBundle() was already added for 2.0 some months ago.

And no, faces-config.xml can have multiple resource bundles. So the var is mandatory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment