MyFaces Test
  1. MyFaces Test
  2. MYFACESTEST-41

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

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.1
    • Fix Version/s: 1.0.2
    • Component/s: Mock Objects
    • Labels:
      None

      Description

      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.

        Activity

        Leonardo Uribe made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Leonardo Uribe made changes -
        Fix Version/s 1.0.2 [ 12316321 ]
        Fix Version/s 1.0.2-SNAPSHOT [ 12316104 ]
        Rudy De Busscher made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.0.2-SNAPSHOT [ 12316104 ]
        Resolution Fixed [ 1 ]
        Hide
        Rudy De Busscher added a comment -

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

        Show
        Rudy De Busscher added a comment - See for an example usage org.apache.myfaces.test.mock.ResourceBundleTest
        Rudy De Busscher created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Rudy De Busscher
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development