You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Rudy De Busscher (JIRA)" <de...@myfaces.apache.org> on 2011/02/09 13:27:04 UTC

[jira] Created: (MYFACESTEST-41) Allow the definition of resourcebundle by name as in faces-config.xml file

Allow the definition of resourcebundle by name as in faces-config.xml file
--------------------------------------------------------------------------

                 Key: MYFACESTEST-41
                 URL: https://issues.apache.org/jira/browse/MYFACESTEST-41
             Project: MyFaces Test
          Issue Type: Improvement
          Components: Mock Objects
    Affects Versions: 1.0.1
            Reporter: Rudy De Busscher


In some projects, we need programmaticly access to the resourceBundle defined in the faces-config.xml.

java code:
        FacesContext context = FacesContext.getCurrentInstance();
        Application application = context.getApplication();
        ResourceBundle rb = application.getResourceBundle(context, "msg");

faces-config.xml :
        <resource-bundle>
            <base-name>org.apache.myfaces.test.messages</base-name>
            <var>msg</var> 
        </resource-bundle>

If during a test, the code is called that looks up the resource bundle, a NullPointerException is throw since the resouce bundle isn't found.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (MYFACESTEST-41) Allow the definition of resourcebundle by name as in faces-config.xml file

Posted by "Rudy De Busscher (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACESTEST-41?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rudy De Busscher resolved MYFACESTEST-41.
-----------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.0.2-SNAPSHOT

See for an example usage org.apache.myfaces.test.mock.ResourceBundleTest

> Allow the definition of resourcebundle by name as in faces-config.xml file
> --------------------------------------------------------------------------
>
>                 Key: MYFACESTEST-41
>                 URL: https://issues.apache.org/jira/browse/MYFACESTEST-41
>             Project: MyFaces Test
>          Issue Type: Improvement
>          Components: Mock Objects
>    Affects Versions: 1.0.1
>            Reporter: Rudy De Busscher
>             Fix For: 1.0.2-SNAPSHOT
>
>
> In some projects, we need programmaticly access to the resourceBundle defined in the faces-config.xml.
> java code:
>         FacesContext context = FacesContext.getCurrentInstance();
>         Application application = context.getApplication();
>         ResourceBundle rb = application.getResourceBundle(context, "msg");
> faces-config.xml :
>         <resource-bundle>
>             <base-name>org.apache.myfaces.test.messages</base-name>
>             <var>msg</var> 
>         </resource-bundle>
> If during a test, the code is called that looks up the resource bundle, a NullPointerException is throw since the resouce bundle isn't found.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira