• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to apply styles for particular string in Message ResourceBundle

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am facing problem to make display a word in bold using Message Resource Bundle in JSF.

My requirement is:

Messages.properties.

headerMessage = "Given label {0} does not match an enumeration. "

In mypage.jsp:

<h:outputFormat value="#{msg.headerMessage}">
<f:param value="MyGrid"/>
</h:outputFormat>

I want to display MyGrid in Bold.

and If i want to display images in {0} token place how do I have to pass image tag?

Please give me suggestion.

Thanks & Regards,
Vish
 
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can use the "escape" attribute to permit use of raw HTML in an outputText item. Use it wisely, however. I've seen some really awful apps where they did structural HTML via text substitution.
reply
    Bookmark Topic Watch Topic
  • New Topic