You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Brian Relph <re...@gmail.com> on 2007/10/24 17:58:34 UTC
struts 2 action messages / action errors
Does struts2 handle the css-styling of action errors and messages the same
as struts1? In struts 1, i defined some keys in the message bundle
errors.prefix and errors.suffix that were automatically used to style the
html generated by the actionerrors. Is this enabled in struts2?
Thanks,
Brian
Re: struts 2 action messages / action errors
Posted by Jim Cushing <ji...@mac.com>.
Struts 2 allows you to style them, but using themes. Themes are both
more powerful and more complicated than what Struts 1 offered.
Before you dive into customizing a theme, see if you can style it
entirely with CSS. You're best better is probably to "View source" in
your browser to see the rendered HTML, noting the classes that the
built-in themes use. Then, override these styles with your own
stylesheet. Using the built-in css_xhtml theme (add
struts.ui.theme=css_xhtml to struts.properties) will give you more
flexibility, compared to the default theme (xhtml).
If that doesn't give you the look you want, it's time to dive into
themes. Themes are documented here:
http://struts.apache.org/2.x/docs/themes-and-templates.html
http://struts.apache.org/2.x/docs/extending-themes.html
Mark Menard has provided an excellent tutorial on creating custom
themes here:
http://www.vitarara.org/cms/struts_2_cookbook/creating_a_theme
On Oct 24, 2007, at 11:58 AM, Brian Relph wrote:
> Does struts2 handle the css-styling of action errors and messages
> the same
> as struts1? In struts 1, i defined some keys in the message bundle
> errors.prefix and errors.suffix that were automatically used to
> style the
> html generated by the actionerrors. Is this enabled in struts2?
>
> Thanks,
> Brian
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org