Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Associating an icon with h:message  RSS feed

 
Eugene Abarquez
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

This question in purely for aesthetic value, but does anybody know how to associate an <h:message> tag with an image or an icon?

I am displaying an error message through <h:message> and I want display an image (like an x-mark) before the string message.

Thanks in advance.
 
Thorsten Duhn
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

you need to make your own custom tag, in which you can include an image component along with a message component.

I don't know the best tutorial, but you may find some on JavaServer Faces (JSF) Tutorial Net in "Developing JSF Components" section. I liked the How To Create Your Own JSF Components for basic understanding. You maybe don't need a renderer, create UIComponents as needed, for example a panelGroup with two children, a graphicImage and your needed htmlMessage.

Regards,
Thorsten
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!