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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to