Skip to content
This repository has been archived by the owner on Mar 20, 2021. It is now read-only.

Resource bundle always null #4394

Open
hrsto opened this issue Feb 10, 2019 · 2 comments
Open

Resource bundle always null #4394

hrsto opened this issue Feb 10, 2019 · 2 comments

Comments

@hrsto
Copy link

hrsto commented Feb 10, 2019

https://github.com/javaserverfaces/mojarra/blob/bbac72aabda02f7e605d05f71da0be2fd0814ce7/impl/src/main/java/javax/faces/component/UIComponent.java#L2688

EE8, JSF 2.3, on Wildfly 15.

From a custom renderer of a custom component, this code:

@Override
public void encodeEnd(FacesContext ctx, UIComponent comp) throws IOException {
     SomeComp c = (SomeComp) comp;

     java.util.ResourceBundle.getBundle(c.getClass().getName(), java.util.Locale.getDefault());

I would get a valid resource bundle with the expected keys and values, as i've set it up.

But if i call c.getResourceBundleMap(); - it will always returns an EMPTY_MAP. Tracked it to the line 2688 of UIComponent.java where i can confirm that className exactly matches the class name of my component, as expected, but still it would return null.

In other words, from my class, the exact same call with the same parameters returns the expected resource bundle, but UIComponent#getResourceBundleMap doesn't. As a work around, i'd overwrite it, i guess.

@erickdeoliveiraleal
Copy link

mojarra issue tracker moved to: https://github.com/eclipse-ee4j/mojarra

@rodrigo-troy
Copy link

rodrigo-troy commented Feb 19, 2019 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants