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.
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:
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 anEMPTY_MAP. Tracked it to the line2688ofUIComponent.javawhere i can confirm thatclassNameexactly matches the class name of my component, as expected, but still it would returnnull.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.