• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to declare multiple message bundles in Faces-config.xml

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I have different properties file which I want to use as message bundle.

Message.properties
Help.properties

When I specify this in faces-config.xml
<application>
<message-bundle>/Message</message-bundle>
<message-bundle>/Help</message-bundle>
</application>

and now when I try to use that in my jsp page like this

<f:loadBundle basename="/Message" var="message"/>
<f:loadBundle basename="/Help" var="help"/>

and access any messagestring from those files I can not excess either of them. But when I use only one of them it works fine.

Am I doing something wrong or I can not do this thing at all??

Thanks in advance.
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Works fine for me. Although my syntax is a bit different:

 
Priti Shah
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi greg,

Thanks for the quick reply.
It is working for me but i found that problem is in my custom component.

In my jsp I am using these bundles like this
<f:loadBundle basename="/Message" var="message"/>
<f:loadBundle basename="/Help" var="help"/>


Now in my custom component I am getting ResourceBundle from the current context and it is returning me 'help' but my messagekey is in 'message' bundle.

Any suggestions how can I do this.

Thanks
 
Everybody's invited. Even this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic