Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Accessing Resource bundle from Facelets UI  RSS feed

 
Kumar Saravanan
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have got my resource bundle. I would like to know how to access the resource bundle from Facelets UI.

Please advice.

Thanks,
Kums
 
Kumar Saravanan
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please give me an update...
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66141
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Kumar",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff
 
Hung Tang
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<hutputText value="#{messages['some.key.in.your.resource.bundle']}"/>
 
Kumar Saravanan
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Hung,

Thanks for your reply.

How about using variable resolver in faces-config.xml and use that variable from facelets? But I have no idea how the variable resolver works?...

Thanks,
Kumar Saravanan
 
Kumar Saravanan
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

What is the best way to access the resource bundle from UI. Currently, I am currently using variable resolver to access the keys (which resides in resource bundle) from the facelets.

Is this the correct way or do I need to load the resource bundle into my facelets page and use it across all the pages?

Please advice.

Thanks,
Kumar Saravanan
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!