I'm using JSF 2.0. I'm using the
<h:messages>
tag to render error messages. I can use css to style my messages a little bit but I've create a composite component to render messages that can be closed and adding effects to them with some Jquery.
I've seen tutorials on how to customize the messages, but most of these rely on css and customizing the text output yet what I want to do is generate specific markup, something like
<myComp:fancyMessage text="etcetcetc error msg" type="error" />
instead of the regular message markup. Is this possible?
EDIT:
I don't want to style up jsf messages. Neither add background nor change its style, but rather create my own message html markup. Here:
http://balusc.blogspot.com/2010/07/using-html-in-jsf-messages.html
I've found how to add html to your messages. What I want is to encapsule all the html in my composite component, and then just use my composite component in this way:
<mycomp:messages/>
or
<mycomp:message for="componentID" />
where message and messages both create their own html markup