struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lukasz Lenart (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-4145) file.ftl in xhtml theme directly references xhtml controlfooter.ftl
Date Thu, 01 Aug 2013 20:05:50 GMT

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

Lukasz Lenart commented on WW-4145:
-----------------------------------

You're are right, the second approach doesn't make sense. With the first I have missed that
the FreemarkerThemeTemplateLoader depends on the TemplateEngine :\

What about moving {{synchronized}} a bit deeper?

{code:java}

TemplateLoader templateLoader = config.getTemplateLoader();
if (!(templateLoader instanceof FreemarkerThemeTemplateLoader)) {
    synchronized (config) {
        config.setTemplateLoader(
            new FreemarkerThemeTemplateLoader(uiThemeExpansionToken, templateLoader, this));
        }
    }
}
{code}

hm... ok, also doesn't make sense :\

I think right the first patch is best available solution.
                
> 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
>
>         Attachments: ThemeExpansion-Alt.patch, ThemeExpansion.patch
>
>
> 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

Mime
View raw message