wood burning stoves 2.0*
The moose likes Struts and the fly likes customizing error messages in struts2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "customizing error messages in struts2" Watch "customizing error messages in struts2" New topic
Author

customizing error messages in struts2

Aarthy Vijay
Greenhorn

Joined: Jun 29, 2004
Posts: 4
Hi ,

I would like to change the color of my validation error message displayed in color red to some other color without bullets.Also would like to highlight the textfield name which was left empty.Kindly advise.
thanks,
Aarthy
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61094
    
  66

"Arathy", you have previously been warned on multiple occasions regarding adjusting your display name to meet JavaRanch standards. This is not optional, and this is your final warning. Adjust your display name to comply with the required standards prior to your next post.

Your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Failure to comply will result in the removal of your account.

bear
JavaRanch Sheriff


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Changing the color is a matter of overriding the default S2 CSS styles.

Adding further styling implies modifying the FreeMarker templates S2 uses to generate the form controls. There's a patch going in that will make some of this easier, but in the currently-released versions you'll have to do that work yourself.

Dave
Aarthy Vijay
Greenhorn

Joined: Jun 29, 2004
Posts: 4
How to override struts2 css styles?
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Load you own stylesheet with style definitions the same name as the S2-provided styles after the S2 stylesheets are loaded.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: customizing error messages in struts2