Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Resource bundle in Prime faces

 
Mary Cole
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have the resource.properties file under WEB-INF/classes folder and the faces-config.xml looks like this


Al accessing the value in an output text



resource.properties entry is



But when I access the xhtml, the value is blank. Am I missing anything here?

Thanks in advance

 
Cesar Loachamin
Ranch Hand
Posts: 90
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mary.

You're a little confused as you say you want to use a resource bundle so you must use a <resource-bundle>, so if you have a properties file named resource.properties you must put it in a package for example com.testpackage, and you can configure the resource bundle in the faces-config so,

And by doing this, you can use the resource (resource is the name that you give to resource-bundle using the <var> tag) as you want:

Regards
Cesar
 
Mary Cole
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks , it worked
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic