JSF addMessage() function auto format the message in properties

I have a problem to print a message on my browser from JSF.

I use the function facesContext.addMessage to put a facesMessage in the message queue that will be displayed thanks to the <h:messages> tag in the JSF page.

The problem is in the function addMessage, I give to it a message present in the propertie file...so I the call to this function like follows :

addMessage("resources.texts",

"text.actionlistener_events_jsp.msg_info1", null,

FacesMessage.SEVERITY_ERROR.toString());

The message in the propertie file is :

<i>ActionListener</i>

So that the word appears in italic.

And it is not the case !!! because the addMessage function format the message in HTML code ... so the '<' becomes < in the message and so the browser has a < in the resulting HTML code. I don't want that the function format the '<' but "give it" to the browser like it ! How do we do then ? Thanks.

[973 byte] By [869845kokoricoa] at [2007-11-26 12:18:51]
# 1
For this you'll have to use style properties of h:messages component
557232amitteva at 2007-7-7 14:59:09 > top of Java-index,Archived Forums,Socket Programming...
# 2
Well, and ? which rule to use ?
869845kokoricoa at 2007-7-7 14:59:09 > top of Java-index,Archived Forums,Socket Programming...
# 3
You can use the attributes errorClass, fatalClass, infoClass and warnClass to apply style classes to several message severiy levels.
619683BalusCa at 2007-7-7 14:59:09 > top of Java-index,Archived Forums,Socket Programming...
# 4
OK I knew. But which CSS rule to use to specify the use of "verbatim" mode ?Is it text-display ? Certainly not ... which ?
869845kokoricoa at 2007-7-7 14:59:09 > top of Java-index,Archived Forums,Socket Programming...
# 5
So ?
869845kokoricoa at 2007-7-7 14:59:09 > top of Java-index,Archived Forums,Socket Programming...
# 6
You're talking about the f:verbatim tag? Well, this gives you the possibility to include raw HTML code inline the JSF code instead of being rendered before the f:view.
619683BalusCa at 2007-7-7 14:59:09 > top of Java-index,Archived Forums,Socket Programming...
# 7
NO ! Read the entire topic first ! Thanks !
869845kokoricoa at 2007-7-7 14:59:09 > top of Java-index,Archived Forums,Socket Programming...