2015-05-05 7:19 GMT+02:00 Zoran Avtarovski <zo...@sparecreative.com>: > I spoke too soon. > > I just replaced all instances of parameters.theme with > parameters.expandTheme. > > I had copied all the missing simple templates into my mobile template
don't do it, Struts will find them. Just override those templates which you need > directory as a work-around. When I deleted optgroup.ftl from the mobile > template directory I get the following error: > > ERROR [ajp-nio-8009-exec-2] - Template processing error: "Error reading > included file template/~~~mobile/optgroup.ftl" > > Error reading included file template/~~~mobile/optgroup.ftl > The problematic instruction: > ---------- > ==> include > "/${parameters.templateDir}/${parameters.expandTheme}/optgroup.ftl" [on > line 118, column 1 in template/simple/select.ftl] > in include "/${parameters.templateDir}/simple/select.ftl" [on line 25, > column 1 in template/mobile/select.ftl] > ---------- > > Java backtrace for programmers: > ---------- > freemarker.template.TemplateException: Error reading included file > template/~~~mobile/optgroup.ftl > . > . > . > Caused by: java.io.FileNotFoundException: Template > template/~~~mobile/optgroup.ftl not found. > > > What I don’t understand I why the template manager doesn’t try to load > optgroup.ftl from the simple template? Maybe because of hardcoded "simple" - and it happens that not all templates were adjusted to be "expandTheme" friendly ;) > > The mobile select.ftl template is simply: > > <#include > "/${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl" /> > <#include "/${parameters.templateDir}/simple/select.ftl" /> You shouldn't hardcode "simple" here, use "expandTheme" to tell Struts to check your theme first and than parent theme. > <#include > "/${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl" /> Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org