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
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?
The mobile select.ftl template is simply:
<#include
"/${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl" />
<#include "/${parameters.templateDir}/simple/select.ftl" />
<#include
"/${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl" />
And the theme.properties file has one entry:
parent=simple
Again any assistance would be appreciated.
Z.
On 1/05/2015 6:23 pm, "Lukasz Lenart" <[email protected]> wrote:
>2015-05-01 1:32 GMT+02:00 Zoran Avtarovski <[email protected]>:
>> We¹ve started a new project which required a custom theme which we call
>> mobile and we set it to extend the simple theme by creating a
>> theme.properties file and setting parent=simple.
>>
>> Unfortunately this isn¹t working. It has in the past without any
>>issues. Has
>> something changed in the latest version of struts that would explain
>>this?
>>
>> We are using struts 2.3.20 and freemarker 2.3.19 if it makes any
>>difference.
>
>Strange, the same mechanism is used by Struts itself. Can you show
>project's structure? Or prepare a small demo app to represent your
>case?
>
>Here you have some examples:
>https://github.com/apache/struts-examples/tree/master/themes
>https://github.com/apache/struts-examples/tree/master/themes_override
>
>
>Regards
>--
>Łukasz
>+ 48 606 323 122 http://www.lenart.org.pl/
>
>---------------------------------------------------------------------
>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]