A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
how to change style of h:messages in code
Joined: Apr 27, 2010
May 23, 2012 04:25:09
in my jsf page i have added message using h:messages which will show message for all component including info and error messages.
but i want info messages to be display as blue and error as red.
i was trying to apply css class but it shows same for all messages
anybody know how to do this?
Joined: Jun 03, 2011
May 23, 2012 05:31:23
The '<h:messages />' component has the attributes 'infoClass' and 'errorClass' class you could use.
Joined: Jun 25, 2001
May 23, 2012 06:35:42
As a general rule, anything that affects appearances in
is handled by CSS. JSF figured that there was already something that worked, so why re-invent it?
Of course, JSF View Definition Language is a higher-level VDL than raw HTML is, so there are often specialized sub-component CSS attributes such as the ones that Louis mentioned.
Customer surveys are for companies who didn't pay proper attention to begin with.
subject: how to change style of h:messages in code
JSF 2.0 cannot rech out-come page
JSF error message - retain ?
h:messages for components only.
messages and conversion errors
display of multiple messages
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014