3 Replies Latest reply on May 10, 2010 4:32 AM by boy18nj

    Loading message bundle for all pages ?

    boy18nj

      I am using this way to load message bundle for all pages-




          <page view-id="*" bundle="messages_en">
              <navigation>
                  <rule if-outcome="home">
                      <redirect view-id="/home.xhtml"/>
                  </rule>
              </navigation>
          </page>
      



      instead of


      f:loadBundle.


      I have some issues with the default loading of message bundle.


        • 1. Re: Loading message bundle for all pages ?
          boy18nj

          Is the above correct way to load messages bundle for all pages ?

          • 2. Re: Loading message bundle for all pages ?
            cbensemann

            You can define your message bundles a couple of different ways in seam. The way you have given is fine and I dont know of any problems doing it that way but its not the way that first comes to mind for me. Check out section 16.4 of the seam reference manual. It gives examples of the different ways of doing it. The way I would prefer to do it is to make use of seams existing resource loader and specify my messages in messages.properties (or multiple page specific properties files if appropriate). If you dont want to use the default messages.properties you can always define your own in components.xml


            <core:resource-loader> <core:bundle-names>
            <value>mycompany_messages</value>
            <value>standard_messages</value> </core:bundle-names>
            </core:resource-loader>



            Like I said I think any of the ways is fine but thats just the way I would rather do it.

            • 3. Re: Loading message bundle for all pages ?
              boy18nj

              Thanks Craig.