• 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

Associating an icon with h:message

 
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic