Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
REST with Spring (video course)
this week in the
how to change style of h:messages in code
Joined: Apr 27, 2010
May 23, 2012 04:25:09
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 JSF 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.
An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: how to change style of h:messages in code
h:messages for components only.
display of multiple messages
JSF error message - retain ?
JSF 2.0 cannot rech out-come page
messages and conversion errors
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015