New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New utility methods for Faces class #57

Closed
julianomqs opened this Issue Sep 4, 2014 · 1 comment

Comments

Projects
None yet
2 participants
@julianomqs

julianomqs commented Sep 4, 2014

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

This comment has been minimized.

Show comment
Hide comment
@BalusC

BalusC Sep 4, 2014

Member

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.

Member

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