struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "" <>
Subject Re: Creating Your Own Struts 2 Theme No Longer Works?
Date Wed, 17 Jul 2013 13:27:00 GMT

  I understand now.  The change is that I have to put the theme attribute on
the s:form tag with a value of xhtml and then use the theme attribute on the
s:checkboxlist tag with a value of KUTheme (my custom check box list theme). 
So the edit.jsp code is:

<s:form action="save" method="post" theme="xhtml">
<s:textfield key="personBean.firstName" /> 
<s:textfield key="personBean.lastName" /> 
<s:select key="" list="sports" />
<s:radio key="personBean.gender" list="genders" />
<s:select key="personBean.residency" list="states" listKey="stateAbbr"
listValue="stateName" />
<s:checkbox key="personBean.over21" />
<s:checkboxlist key="personBean.carModels" list="carModelsAvailable"
theme="KUTheme" />
<s:submit key="submit" />

That is a change from the previous theme behavior (I don't know how long ago
the change was made).  Previously I just had to put the theme attribute on
the s:form tag (e.g. theme="KUTheme") and then Struts 2 would look for the
ftl files in either the template directory in struts2-core or in a folder
named KUTheme (my theme name) in the template directory in my applications
webapp folder.

Thank you for the help.


View this message in context:
Sent from the Struts - Dev mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message