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

Resource bundle always null #4394

Description

@hrsto

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.

Activity

  1. erickdeoliveiraleal commented on Feb 19, 2019

    @erickdeoliveiraleal

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

  2. rodrigo-troy commented on Feb 19, 2019

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions