Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

message-bundle

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,
I am trying to localize general REQUIRED message and from some reason I can not pass through parameter.

Part of my faces-config.xml
...
<locale-config>
<default-locale>en</default-locale>
</locale-config>
<message-bundle>com.test.i18n.messages</message-bundle>
</application>

messages.properties
...
javax.faces.component.UIInput.REQUIRED=Value is required for {0}.

And what I get on screen when validation fails is:
Value is required for {0}.

I would expect something like:
Value is required for Name.
where "Name" is text value for Label widget attached to specific required text field.

So it seems like my <message-bundle> tag does not support attributes. But it should because original message is :
javax.faces.component.UIInput.REQUIRED={0}: Validation Error: Value is required.

Any idea?

Thanks

Tomas
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic