Thanks Pedro,
But this is not really my problem. For all form related template, I had to
copy them all in my new theme due to the fact that 'hard' xhtml templates
references exists in the xhtml theme. (The following include is every where:
<#include "/${parameters.templateDir}/xhtml/controlfooter.ftl" />)
What I don't understand is that I have to copy all other templates from
simple theme (a, a-close, actionmessage, actionerrors, div, ...), otherwise
I get Exceptions (see below) when calling related tags (<s:a>,
<s:actionerrors>, <s:actionmessages>, ...) Normally, the
FreemarkerTemplateEngine from Struts should look in xhtml theme then in
simple theme.
java.io.FileNotFoundException: Template /template/jbb/a-close.ftl not found.
at freemarker.template.Configuration.getTemplate(Configuration.java:489)
at freemarker.template.Configuration.getTemplate(Configuration.java:452)
at
org.apache.struts2.components.template.FreemarkerTemplateEngine.renderTemplate(FreemarkerTemplateEngine.java:96)
at org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:530)
at org.apache.struts2.components.UIBean.end(UIBean.java:484)
at
org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:43)
at
org.apache.jsp.WEB_002dINF.fragments.footer_jsp._jspx_meth_s_005fa_005f12(footer_jsp.java:597)
at
org.apache.jsp.WEB_002dINF.fragments.footer_jsp._jspService(footer_jsp.java:132)
Pedro Herrera wrote:
>
> I had the same problem.
> I´ve created my own template, in theme.properties I put 'parent=css_xhtml'
> .
> I´ve copied controlheader.flt from template.css_xhtml to my template and
> changed to :
>
> <#include
> "/${parameters.templateDir}/${themeProperties.parent}/controlheader.ftl"
> />
> <#if parameters.labelposition?default("top") == 'top'>
> <div <#rt/>
> <#else>
>
> </#if>
> <#if parameters.id?exists>id="wwctrl_${parameters.id}"<#rt/></#if>
> class="wwctrl">
>
>
> NOTE : the first line cames with error :
> <#include "/${parameters.templateDir}/css_xhtml/controlheader-core.ftl">
> the correct is :
> <#include
> "/${parameters.templateDir}/${themeProperties.parent}/controlheader.ftl"
> />
>
> this workaround resolved my problem
>
>
> Herrera
>
>
>
>
>
>
> Aymeric Levaux wrote:
>>
>> Does this (https://issues.apache.org/struts/browse/WW-1328) means, that
>> at this moment we cannot create our own theme with a theme.properties
>> that specifies that we extend an other theme ?
>>
>> I made a theme that extends xhtml and set it as the default one in
>> struts.properties. But every template I didn't rewrite causes an
>> exception when the related tag is used. The problem is that Struts does
>> not look in the parent theme when it does not found a template.
>>
>> What I don't understand is that this mechanism is working for the
>> css_xhtml theme that does not redefine every templates and extends xhtml.
>>
>> Am I missing something?
>>
>> --
>> Aymeric
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/Cannot-extend-a-theme-tf4217548.html#a12007690
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]