This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSF message in faces-config.xml itself

 
Ali Manji
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All, JSF Newbie Question:

Is it possible to use messages from a bundle within faces-config.xml?

For example in faces-config.xml I have the following:

<application>
<message-bundle>resources.ApplicationMessages</message-bundle>
</application>

I want to set some default values for a managed bean which contains an array whose values I want to show up in a listBox or comboBox for a JSF Faces page, rather than hard-coding english literals in the faces-config.xml like:

<managed-property>
<property-name>months</property-name>
<list-entries>
<value>January</value>
<value>February</value>
<value>March</value>
<value>April</value>
</list-entries>
</managed-property>

I'd rather reference the message bundle from from the application element type above? Is this possible? If not how does one configure default values through the faces-config.ml file in an international-friendly way?

Thanks in advance
Ali
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64980
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to the Web Franeworks forum where the JSF-savvy hang out.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic