• 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
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

JSF message in faces-config.xml itself

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 67756
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to the Web Franeworks forum where the JSF-savvy hang out.
 
No thanks. We have all the government we need. This tiny ad would like you to leave now:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic