[ 
https://issues.apache.org/jira/browse/WW-4145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13724340#comment-13724340
 ] 

Jasper Rosenberg commented on WW-4145:
--------------------------------------

I'm not sure how CopyOnWriteArrayList would work.  I'm using ThreadLocal to 
work around not being able to pass the theme hierarchy as a parameter to 
findTemplateSource() which is necessary since it varies by template (though is 
deterministic per template).  

We could move the top level template selection into the ThemeTemplateLoader 
itself though, which would be a bit more consistent.  We could pass in the 
struts2 TemplateContext or Template rather than the hierarchy via ThreadLocal.  

I'm realizing that we would need the thread local to be available during 
template rendering as well so it is visible to the sub-includes which was 
pretty much the point in the first place :)
                
> file.ftl in xhtml theme directly references xhtml controlfooter.ftl
> -------------------------------------------------------------------
>
>                 Key: WW-4145
>                 URL: https://issues.apache.org/jira/browse/WW-4145
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Other
>    Affects Versions: 2.3.15.1
>            Reporter: Jasper Rosenberg
>            Assignee: Lukasz Lenart
>              Labels: freemarker, tags, xhtml
>             Fix For: 2.3.16
>
>
> Should use $\{parameters.theme} instead so can be used in theme extension.
> {code}
> <#include "/${parameters.templateDir}/${parameters.theme}/controlheader.ftl" 
> />
> <#include "/${parameters.templateDir}/simple/file.ftl" />
> <#include "/${parameters.templateDir}/${parameters.theme}/controlfooter.ftl" 
> />
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to