aspose file tools
The moose likes JSF and the fly likes How to apply styles for particular string in Message ResourceBundle Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » JSF
Reply Bookmark "How to apply styles for particular string in Message ResourceBundle" Watch "How to apply styles for particular string in Message ResourceBundle" New topic
Author

How to apply styles for particular string in Message ResourceBundle

vish nath
Greenhorn

Joined: Oct 08, 2009
Posts: 3
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:

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

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
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 14573
    
    7

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.

Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: How to apply styles for particular string in Message ResourceBundle
 
Similar Threads
<f:param using ternary operator problem
<outputFormat> tag
Nested EL in h:outputFormat
<h:outputFormat displaying null values on page load
Conditional logic in JSF