You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Jorge Vásquez <jv...@3eyegroup.com> on 2006/12/20 17:41:42 UTC

show image error icon with h:messages component

Regards to all,

Is there a way to include an icon within the h:messages component?

 

Thanks,

JV   


Re: show image error icon with h:messages component

Posted by Jonathan Harley <jo...@parkplatz.net>.
Jorge Vásquez wrote:
> Regards to all,
> 
> Is there a way to include an icon within the h:messages component?

MyFaces renders h:messages in HTML as an <ul> list, so you can
apply a CSS style to this, for example:

form ul {
   list-style-image: url("graphics/messageIcon.gif");
}

This says that each item of any ul inside a form, will have the
specified icon to the left of it. (You might want to make the CSS
selector more specific of course, for example by giving the
h:messages a styleClass attribute.)


J.
-- 
.....................................................................
           Dr Jonathan Harley   .
                                .   Email: jon@parkplatz.net
            Zac Parkplatz Ltd   .   Office Telephone: 024 7633 1375
            www.parkplatz.net   .   Mobile: 079 4116 0423