struts-dev mailing list archives

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

  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="personBean.sport" 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" />
</s:form>

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.

Bruce



--
View this message in context: http://struts.1045723.n5.nabble.com/Creating-Your-Own-Struts-2-Theme-No-Longer-Works-tp5713191p5713230.html
Sent from the Struts - Dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message