Done :-) Few things (it will help other as well): - template directory must be accessible via classpath, in the same way as templates included in Struts2 are available (they are located in struts2-core.jar) - when overriding one file from the parent theme you can use "expandTheme" variable for proper theme inheritance - thus will tell framework to search chain of parents' themes - then you can use your custom theme as defaultTheme by defining it with "struts.ui.theme" constant
There is one drawback right now (and I don't have good solution right now), you can see it in KUTheme/checkboxlist.ftl - it must directly reference KUTheme_simple/checkboxlist.ftl because in other case you will get stack overflow Regards -- Ćukasz + 48 606 323 122 http://www.lenart.org.pl/ 2013/12/12 [email protected] <[email protected]>: > I've updated the Struts 2 example applications at > https://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2examples/ to > use 2.3.16 release. > > The theme example still doesn't work and I've not been able to figure out > how to fix it. I know that 2.3.16 includes some changes to how to extend a > Struts 2 theme. > > In my example I'm trying to extend the the XHTML checkboxlist.ftl so that it > uses a <br /> instead of a space between the checkbox items. The theme is > applied in edit.jsp. > > I've read over: > http://struts.apache.org/release/2.3.x/docs/extending-themes.html but it > wasn't very helpful. I do have a theme.properties file. > > If someone could take a look at the themes example project (checkout the > code from the above svn, then cd into the themes directory - do mvn -e clean > package to build the .war file and the copy target/themes.war to your tomcat > server - go to http://localhost:8080/themes > > I'd really like to get this working - I'll update > http://struts.apache.org/release/2.3.x/docs/extending-themes.html and > http://struts.apache.org/release/2.3.x/docs/struts-2-themes.html with the > correct instructions after getting some help. > > Thank you. > > Bruce > > > > -- > View this message in context: > http://struts.1045723.n5.nabble.com/Struts-2-3-16-Extending-Theme-Example-Problem-tp5714911.html > Sent from the Struts - Dev mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
