You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2013/10/28 18:29:31 UTC

svn commit: r1536435 - in /struts/struts2/trunk/core/src: main/java/org/apache/struts2/ main/java/org/apache/struts2/components/ main/java/org/apache/struts2/components/template/ main/java/org/apache/struts2/views/freemarker/ main/resources/ main/resou...

Author: lukaszlenart
Date: Mon Oct 28 17:29:30 2013
New Revision: 1536435

URL: http://svn.apache.org/r1536435
Log:
WW-4145 Improves extending theme mechanism to allow override just one file in parent theme

Added:
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerThemeTemplateLoader.java
Removed:
    struts/struts2/trunk/core/src/main/resources/template/css_xhtml/checkboxlist.ftl
    struts/struts2/trunk/core/src/main/resources/template/css_xhtml/combobox.ftl
    struts/struts2/trunk/core/src/main/resources/template/css_xhtml/debug.ftl
    struts/struts2/trunk/core/src/main/resources/template/css_xhtml/doubleselect.ftl
    struts/struts2/trunk/core/src/main/resources/template/css_xhtml/file.ftl
    struts/struts2/trunk/core/src/main/resources/template/css_xhtml/form-close.ftl
    struts/struts2/trunk/core/src/main/resources/template/css_xhtml/form.ftl
    struts/struts2/trunk/core/src/main/resources/template/css_xhtml/inputtransferselect.ftl
    struts/struts2/trunk/core/src/main/resources/template/css_xhtml/optiontransferselect.ftl
    struts/struts2/trunk/core/src/main/resources/template/css_xhtml/password.ftl
    struts/struts2/trunk/core/src/main/resources/template/css_xhtml/radiomap.ftl
    struts/struts2/trunk/core/src/main/resources/template/css_xhtml/select.ftl
    struts/struts2/trunk/core/src/main/resources/template/css_xhtml/text.ftl
    struts/struts2/trunk/core/src/main/resources/template/css_xhtml/textarea.ftl
    struts/struts2/trunk/core/src/main/resources/template/css_xhtml/updownselect.ftl
    struts/struts2/trunk/core/src/main/resources/template/xhtml/debug.ftl
Modified:
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/StrutsConstants.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UIBean.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/template/FreemarkerTemplateEngine.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java
    struts/struts2/trunk/core/src/main/resources/org/apache/struts2/default.properties
    struts/struts2/trunk/core/src/main/resources/struts-default.xml
    struts/struts2/trunk/core/src/main/resources/template/css_xhtml/controlheader.ftl
    struts/struts2/trunk/core/src/main/resources/template/css_xhtml/label.ftl
    struts/struts2/trunk/core/src/main/resources/template/simple/a-close.ftl
    struts/struts2/trunk/core/src/main/resources/template/simple/checkbox.ftl
    struts/struts2/trunk/core/src/main/resources/template/simple/checkboxlist.ftl
    struts/struts2/trunk/core/src/main/resources/template/simple/combobox.ftl
    struts/struts2/trunk/core/src/main/resources/template/simple/div.ftl
    struts/struts2/trunk/core/src/main/resources/template/simple/file.ftl
    struts/struts2/trunk/core/src/main/resources/template/simple/form-common.ftl
    struts/struts2/trunk/core/src/main/resources/template/simple/form.ftl
    struts/struts2/trunk/core/src/main/resources/template/simple/hidden.ftl
    struts/struts2/trunk/core/src/main/resources/template/simple/inputtransferselect.ftl
    struts/struts2/trunk/core/src/main/resources/template/simple/label.ftl
    struts/struts2/trunk/core/src/main/resources/template/simple/optgroup.ftl
    struts/struts2/trunk/core/src/main/resources/template/simple/password.ftl
    struts/struts2/trunk/core/src/main/resources/template/simple/radiomap.ftl
    struts/struts2/trunk/core/src/main/resources/template/simple/reset.ftl
    struts/struts2/trunk/core/src/main/resources/template/simple/select.ftl
    struts/struts2/trunk/core/src/main/resources/template/simple/submit.ftl
    struts/struts2/trunk/core/src/main/resources/template/simple/text.ftl
    struts/struts2/trunk/core/src/main/resources/template/simple/textarea.ftl
    struts/struts2/trunk/core/src/main/resources/template/xhtml/checkbox.ftl
    struts/struts2/trunk/core/src/main/resources/template/xhtml/checkboxlist.ftl
    struts/struts2/trunk/core/src/main/resources/template/xhtml/combobox.ftl
    struts/struts2/trunk/core/src/main/resources/template/xhtml/controlheader-core.ftl
    struts/struts2/trunk/core/src/main/resources/template/xhtml/controlheader.ftl
    struts/struts2/trunk/core/src/main/resources/template/xhtml/doubleselect.ftl
    struts/struts2/trunk/core/src/main/resources/template/xhtml/file.ftl
    struts/struts2/trunk/core/src/main/resources/template/xhtml/form-close.ftl
    struts/struts2/trunk/core/src/main/resources/template/xhtml/form.ftl
    struts/struts2/trunk/core/src/main/resources/template/xhtml/inputtransferselect.ftl
    struts/struts2/trunk/core/src/main/resources/template/xhtml/label.ftl
    struts/struts2/trunk/core/src/main/resources/template/xhtml/optiontransferselect.ftl
    struts/struts2/trunk/core/src/main/resources/template/xhtml/password.ftl
    struts/struts2/trunk/core/src/main/resources/template/xhtml/radiomap.ftl
    struts/struts2/trunk/core/src/main/resources/template/xhtml/reset.ftl
    struts/struts2/trunk/core/src/main/resources/template/xhtml/select.ftl
    struts/struts2/trunk/core/src/main/resources/template/xhtml/submit-close.ftl
    struts/struts2/trunk/core/src/main/resources/template/xhtml/text.ftl
    struts/struts2/trunk/core/src/main/resources/template/xhtml/textarea.ftl
    struts/struts2/trunk/core/src/main/resources/template/xhtml/updownselect.ftl
    struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/freemarker/FreeMarkerResultTest.java
    struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/freemarker/FreemarkerManagerTest.java
    struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/freemarker/dynaAttributes.ftl
    struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/freemarker/manual-list.ftl

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/StrutsConstants.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/StrutsConstants.java?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/StrutsConstants.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/StrutsConstants.java Mon Oct 28 17:29:30 2013
@@ -129,6 +129,9 @@ public final class StrutsConstants {
     /** The default UI template theme */
     public static final String STRUTS_UI_THEME = "struts.ui.theme";
 
+    /** Token to use to indicate start of theme to be expanded. */
+    public static final String STRUTS_UI_THEME_EXPANSION_TOKEN = "struts.ui.theme.expansion.token";
+
     /** The maximize size of a multipart request (file upload) */
     public static final String STRUTS_MULTIPART_MAXSIZE = "struts.multipart.maxSize";
 

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UIBean.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UIBean.java?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UIBean.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UIBean.java Mon Oct 28 17:29:30 2013
@@ -84,6 +84,21 @@ import java.util.concurrent.ConcurrentMa
  *          <td>String</td>
  *          <td>define the template name</td>
  *       </td>
+ *       <tr>
+ *          <td>themeExpansionToken</td>
+ *          <td>n/a</td>
+ *          <td>String</td>
+ *          <td>special token (defined with struts.ui.theme.expansion.token) used to search for template in parent theme
+ *          (don't use it separately!)</td>
+ *       </td>
+ *       <tr>
+ *          <td>expandTheme</td>
+ *          <td>n/a</td>
+ *          <td>String</td>
+ *          <td>concatenation of themeExpansionToken and theme which tells internal template loader mechanism
+ *          to try load template from current theme and then from parent theme (and parent theme, and so on)
+ *          when used with &lt;#include/&gt; directive</td>
+ *       </td>
  *    </tbody>
  * </table>
  *
@@ -499,6 +514,7 @@ public abstract class UIBean extends Com
 
     protected String defaultTemplateDir;
     protected String defaultUITheme;
+    protected String uiThemeExpansionToken;
     protected TemplateEngineManager templateEngineManager;
 
     // dynamic attributes support for tags used with FreeMarker templates
@@ -514,6 +530,11 @@ public abstract class UIBean extends Com
         this.defaultUITheme = theme;
     }
 
+    @Inject(StrutsConstants.STRUTS_UI_THEME_EXPANSION_TOKEN)
+    public void setUIThemeExpansionToken(String uiThemeExpansionToken) {
+        this.uiThemeExpansionToken = uiThemeExpansionToken;
+    }
+
     @Inject
     public void setTemplateEngineManager(TemplateEngineManager mgr) {
         this.templateEngineManager = mgr;
@@ -627,9 +648,15 @@ public abstract class UIBean extends Com
     }
 
     public void evaluateParams() {
-        addParameter("templateDir", getTemplateDir());
-        addParameter("theme", getTheme());
+        String templateDir = getTemplateDir();
+        String theme = getTheme();
+        
+        addParameter("templateDir", templateDir);
+        addParameter("theme", theme);
+        addParameter("template", template != null ? findString(template) : getDefaultTemplate());
         addParameter("dynamicAttributes", dynamicAttributes);
+        addParameter("themeExpansionToken", uiThemeExpansionToken);
+        addParameter("expandTheme", uiThemeExpansionToken + theme);
 
         String name = null;
         String providedLabel = null;

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/template/FreemarkerTemplateEngine.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/template/FreemarkerTemplateEngine.java?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/template/FreemarkerTemplateEngine.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/template/FreemarkerTemplateEngine.java Mon Oct 28 17:29:30 2013
@@ -23,6 +23,7 @@ package org.apache.struts2.components.te
 
 import java.io.IOException;
 import java.io.Writer;
+import java.util.Locale;
 import java.util.Map;
 import java.util.List;
 

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java Mon Oct 28 17:29:30 2013
@@ -179,6 +179,7 @@ public class FreemarkerManager {
     protected Map<String,TagLibrary> tagLibraries;
 
     private FileManager fileManager;
+    private FreemarkerThemeTemplateLoader themeTemplateLoader;
 
     @Inject(StrutsConstants.STRUTS_I18N_ENCODING)
     public void setEncoding(String encoding) {
@@ -220,6 +221,11 @@ public class FreemarkerManager {
         this.fileManager = fileManagerFactory.getFileManager();
     }
 
+    @Inject
+    public void setThemeTemplateLoader(FreemarkerThemeTemplateLoader themeTemplateLoader) {
+        this.themeTemplateLoader = themeTemplateLoader;
+    }
+
     public boolean getNoCharsetInContentType() {
         return noCharsetInContentType;
     }
@@ -257,15 +263,9 @@ public class FreemarkerManager {
                     LOG.error("Cannot load freemarker configuration: ",e);
                 }
             }
-//            config = createConfiguration(servletContext);
-
             // store this configuration in the servlet context
             servletContext.setAttribute(CONFIG_SERVLET_CONTEXT_KEY, config);
-
-            config.setWhitespaceStripping(true);
         }
-
-
         return config;
     }
 
@@ -289,11 +289,22 @@ public class FreemarkerManager {
             templatePath = servletContext.getInitParameter("templatePath");
         }
 
-        config.setTemplateLoader(createTemplateLoader(servletContext, templatePath));
+        configureTemplateLoader(createTemplateLoader(servletContext, templatePath));
 
         loadSettings(servletContext);
     }
 
+    /** 
+     * Sets the Freemarker Configuration's template loader with the FreemarkerThemeTemplateLoader 
+     * at the top.
+     * 
+     * @see org.apache.struts2.views.freemarker.FreemarkerThemeTemplateLoader
+     */
+    protected void configureTemplateLoader(TemplateLoader templateLoader) {
+        themeTemplateLoader.init(templateLoader);
+        config.setTemplateLoader(themeTemplateLoader);
+    }
+    
     /**
      * Create the instance of the freemarker Configuration object.
      * <p/>
@@ -321,8 +332,7 @@ public class FreemarkerManager {
         if (encoding != null) {
             configuration.setDefaultEncoding(encoding);
         }
-
-
+        configuration.setLocalizedLookup(false);
         configuration.setWhitespaceStripping(true);
 
         return configuration;

Added: struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerThemeTemplateLoader.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerThemeTemplateLoader.java?rev=1536435&view=auto
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerThemeTemplateLoader.java (added)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerThemeTemplateLoader.java Mon Oct 28 17:29:30 2013
@@ -0,0 +1,95 @@
+package org.apache.struts2.views.freemarker;
+
+import java.io.IOException;
+import java.io.Reader;
+import java.util.List;
+
+import org.apache.struts2.StrutsConstants;
+import org.apache.struts2.components.template.Template;
+import org.apache.struts2.components.template.TemplateEngine;
+
+import com.opensymphony.xwork2.inject.Inject;
+
+import freemarker.cache.TemplateLoader;
+
+/**
+ * When loading a template, if sees theme token in path, does a template search through
+ * theme hierarchy for template, starting at the theme name after the token.
+ */
+public class FreemarkerThemeTemplateLoader implements TemplateLoader{
+    private TemplateLoader parentTemplateLoader;
+
+    // Injected
+    private String themeExpansionToken;
+    private TemplateEngine templateEngine;
+
+    /**
+     * Initialize the loader for the given parent.
+     */
+    public void init(TemplateLoader parent) {
+        this.parentTemplateLoader = parent;
+    }
+
+    /** {@inheritDoc} */
+    public Object findTemplateSource(String name) throws IOException {
+        int tokenIndex = (name == null) ? -1 : name.indexOf(themeExpansionToken);
+        if (tokenIndex < 0) {
+            return parentTemplateLoader.findTemplateSource(name);
+        }
+
+        int themeEndIndex = name.indexOf('/', tokenIndex);
+        if (themeEndIndex < 0) {
+            return parentTemplateLoader.findTemplateSource(name);
+        }
+
+        Template template = new Template(
+            name.substring(0, tokenIndex - 1), 
+            name.substring(tokenIndex + themeExpansionToken.length(), themeEndIndex), 
+            name.substring(themeEndIndex + 1));
+        
+        List<Template> possibleTemplates = template.getPossibleTemplates(templateEngine);
+        for (Template possibleTemplate : possibleTemplates) {
+            Object templateSource = parentTemplateLoader.findTemplateSource(
+                    possibleTemplate.toString().substring(1));
+            if (templateSource != null) {
+                return templateSource;
+            }
+        }
+        String parentTheme = (String) templateEngine.getThemeProps(template).get("parent");
+        if (parentTheme == null) {
+            // no parent theme, no way to fetch parent template
+            return null;
+        }
+        String parentName = "/" + template.getDir() + "/" + themeExpansionToken + parentTheme + "/" + template.getName();
+        return this.findTemplateSource(parentName);
+    }
+    
+    /** {@inheritDoc} */
+    public long getLastModified(Object templateSource) {
+        return parentTemplateLoader.getLastModified(templateSource);
+    }
+
+    /** {@inheritDoc} */
+    public Reader getReader(Object templateSource, String encoding) throws IOException {
+        return parentTemplateLoader.getReader(templateSource, encoding);
+    }
+
+    /** {@inheritDoc} */
+    public void closeTemplateSource(Object templateSource) throws IOException {
+        parentTemplateLoader.closeTemplateSource(templateSource);
+    }
+
+    @Inject(StrutsConstants.STRUTS_UI_THEME_EXPANSION_TOKEN)
+    public void setUIThemeExpansionToken(String token) {
+        themeExpansionToken = token;
+    }
+
+    @Inject("ftl")
+    public void setTemplateEngine(TemplateEngine templateEngine) {
+        this.templateEngine = templateEngine;
+    }
+
+    public TemplateLoader getParentTemplateLoader() {
+        return parentTemplateLoader;
+    }
+}

Modified: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/default.properties
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/default.properties?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/org/apache/struts2/default.properties (original)
+++ struts/struts2/trunk/core/src/main/resources/org/apache/struts2/default.properties Mon Oct 28 17:29:30 2013
@@ -141,6 +141,8 @@ struts.i18n.reload=false
 ### Change this to reflect which path should be used for JSP control tag templates by default
 struts.ui.theme=xhtml
 struts.ui.templateDir=template
+### Change this to use a different token to indicate template theme expansion
+struts.ui.theme.expansion.token=~~~
 #sets the default template type. Either ftl, vm, or jsp
 struts.ui.templateSuffix=ftl
 

Modified: struts/struts2/trunk/core/src/main/resources/struts-default.xml
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/struts-default.xml?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/struts-default.xml (original)
+++ struts/struts2/trunk/core/src/main/resources/struts-default.xml Mon Oct 28 17:29:30 2013
@@ -65,6 +65,7 @@
 
     <bean type="org.apache.struts2.views.TagLibrary" name="s" class="org.apache.struts2.views.DefaultTagLibrary" />
 
+    <bean class="org.apache.struts2.views.freemarker.FreemarkerThemeTemplateLoader" />
     <bean class="org.apache.struts2.views.freemarker.FreemarkerManager" name="struts" />
     <bean class="org.apache.struts2.views.velocity.VelocityManager" name="struts" optional="true" />
 

Modified: struts/struts2/trunk/core/src/main/resources/template/css_xhtml/controlheader.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/css_xhtml/controlheader.ftl?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/css_xhtml/controlheader.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/css_xhtml/controlheader.ftl Mon Oct 28 17:29:30 2013
@@ -20,11 +20,11 @@
  * under the License.
  */
 -->
-<#include "/${parameters.templateDir}/css_xhtml/controlheader-core.ftl">
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlheader-core.ftl">
 <#if parameters.labelposition?default("top") == 'top'>
 <div <#rt/>
 <#else>
 <span <#rt/>
 </#if>
 <#if parameters.id??>id="wwctrl_${parameters.id}"<#rt/></#if> class="wwctrl">
-    
\ No newline at end of file
+    

Modified: struts/struts2/trunk/core/src/main/resources/template/css_xhtml/label.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/css_xhtml/label.ftl?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/css_xhtml/label.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/css_xhtml/label.ftl Mon Oct 28 17:29:30 2013
@@ -21,7 +21,7 @@
  */
 -->
 <#--include "/${parameters.templateDir}/css_xhtml/controlheader.ftl" /-->
-<#include "/${parameters.templateDir}/${parameters.theme}/controlheader.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl" />
 <label<#rt/>
 <#if parameters.id??>
  id="${parameters.id?html}"<#rt/>
@@ -44,4 +44,4 @@
 </#if>
 &nbsp;
 </label>
-<#include "/${parameters.templateDir}/css_xhtml/controlfooter.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl" />

Modified: struts/struts2/trunk/core/src/main/resources/template/simple/a-close.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/simple/a-close.ftl?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/simple/a-close.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/simple/a-close.ftl Mon Oct 28 17:29:30 2013
@@ -39,7 +39,7 @@
 <#if parameters.title??>
  title="${parameters.title?html}"<#rt/>
 </#if>
-<#include "/${parameters.templateDir}/simple/scripting-events.ftl" />
-<#include "/${parameters.templateDir}/simple/common-attributes.ftl" />
-<#include "/${parameters.templateDir}/simple/dynamic-attributes.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/scripting-events.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/common-attributes.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/dynamic-attributes.ftl" />
 >${parameters.body}</a>
\ No newline at end of file

Modified: struts/struts2/trunk/core/src/main/resources/template/simple/checkbox.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/simple/checkbox.ftl?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/simple/checkbox.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/simple/checkbox.ftl Mon Oct 28 17:29:30 2013
@@ -36,15 +36,15 @@
 <#if parameters.id??>
  id="${parameters.id?html}"<#rt/>
 </#if>
-<#include "/${parameters.templateDir}/simple/css.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/css.ftl" />
 <#if parameters.title??>
  title="${parameters.title?html}"<#rt/>
 </#if>
-<#include "/${parameters.templateDir}/simple/scripting-events.ftl" />
-<#include "/${parameters.templateDir}/simple/common-attributes.ftl" />
-<#include "/${parameters.templateDir}/simple/dynamic-attributes.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/scripting-events.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/common-attributes.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/dynamic-attributes.ftl" />
 /><input type="hidden" id="__checkbox_${parameters.id?html}" name="__checkbox_${parameters.name?html}" value="${parameters.fieldValue?html}"<#rt/>
 <#if parameters.disabled?default(false)>
  disabled="disabled"<#rt/>
 </#if>
- />
\ No newline at end of file
+ />

Modified: struts/struts2/trunk/core/src/main/resources/template/simple/checkboxlist.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/simple/checkboxlist.ftl?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/simple/checkboxlist.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/simple/checkboxlist.ftl Mon Oct 28 17:29:30 2013
@@ -85,9 +85,9 @@
      title="${parameters.title?html}"<#rt/>
         </#if>
     </#if>
-    <#include "/${parameters.templateDir}/simple/css.ftl" />
-    <#include "/${parameters.templateDir}/simple/scripting-events.ftl" />
-    <#include "/${parameters.templateDir}/simple/common-attributes.ftl" />
+    <#include "/${parameters.templateDir}/${parameters.expandTheme}/css.ftl" />
+    <#include "/${parameters.templateDir}/${parameters.expandTheme}/scripting-events.ftl" />
+    <#include "/${parameters.templateDir}/${parameters.expandTheme}/common-attributes.ftl" />
         />
 <label for="${parameters.name?html}-${itemCount}" class="checkboxLabel">${itemValue?html}</label>
 </...@s.iterator>
@@ -99,4 +99,4 @@
 <#if parameters.disabled?default(false)>
        disabled="disabled"<#rt/>
 </#if>
-        />
\ No newline at end of file
+        />

Modified: struts/struts2/trunk/core/src/main/resources/template/simple/combobox.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/simple/combobox.ftl?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/simple/combobox.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/simple/combobox.ftl Mon Oct 28 17:29:30 2013
@@ -39,7 +39,7 @@
 <br />
 <#if parameters.list??>
 <select onChange="autoPopulate_${parameters.escapedId?html}(this);"<#rt/>
-<#include "/${parameters.templateDir}/simple/css.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/css.ftl" />
     <#if parameters.disabled?default(false)>
  disabled="disabled"<#rt/>
     </#if>

Modified: struts/struts2/trunk/core/src/main/resources/template/simple/div.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/simple/div.ftl?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/simple/div.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/simple/div.ftl Mon Oct 28 17:29:30 2013
@@ -26,7 +26,7 @@
 <#if parameters.cssClass??> class="${parameters.cssClass?html}"<#rt/></#if>
 <#if parameters.cssStyle??> style="${parameters.cssStyle?html}"<#rt/></#if>
 <#if parameters.title??> title="${parameters.title?html}"<#rt/></#if>
-<#include "/${parameters.templateDir}/simple/scripting-events.ftl" />
-<#include "/${parameters.templateDir}/simple/common-attributes.ftl" />
-<#include "/${parameters.templateDir}/simple/dynamic-attributes.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/scripting-events.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/common-attributes.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/dynamic-attributes.ftl" />
 >
\ No newline at end of file

Modified: struts/struts2/trunk/core/src/main/resources/template/simple/file.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/simple/file.ftl?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/simple/file.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/simple/file.ftl Mon Oct 28 17:29:30 2013
@@ -38,11 +38,11 @@
 <#if parameters.id??>
  id="${parameters.id?html}"<#rt/>
 </#if>
-<#include "/${parameters.templateDir}/simple/css.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/css.ftl" />
 <#if parameters.title??>
  title="${parameters.title?html}"<#rt/>
 </#if>
-<#include "/${parameters.templateDir}/simple/scripting-events.ftl" />
-<#include "/${parameters.templateDir}/simple/common-attributes.ftl" />
-<#include "/${parameters.templateDir}/simple/dynamic-attributes.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/scripting-events.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/common-attributes.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/dynamic-attributes.ftl" />
 />
\ No newline at end of file

Modified: struts/struts2/trunk/core/src/main/resources/template/simple/form-common.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/simple/form-common.ftl?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/simple/form-common.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/simple/form-common.ftl Mon Oct 28 17:29:30 2013
@@ -64,4 +64,4 @@
 <#if parameters.acceptcharset??>
  accept-charset="${parameters.acceptcharset?html}"<#rt/>
 </#if>
-<#include "/${parameters.templateDir}/simple/dynamic-attributes.ftl" />
\ No newline at end of file
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/dynamic-attributes.ftl" />
\ No newline at end of file

Modified: struts/struts2/trunk/core/src/main/resources/template/simple/form.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/simple/form.ftl?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/simple/form.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/simple/form.ftl Mon Oct 28 17:29:30 2013
@@ -20,8 +20,8 @@
  * under the License.
  */
 -->
-<#include "/${parameters.templateDir}/simple/form-common.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/form-common.ftl" />
 <#if parameters.onreset??>
  onreset="${parameters.onreset?html}"<#rt/>
 </#if>
->
\ No newline at end of file
+>

Modified: struts/struts2/trunk/core/src/main/resources/template/simple/hidden.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/simple/hidden.ftl?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/simple/hidden.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/simple/hidden.ftl Mon Oct 28 17:29:30 2013
@@ -37,5 +37,5 @@
 <#if parameters.disabled?default(false)>
  disabled="disabled"<#rt/>
 </#if>
-<#include "/${parameters.templateDir}/simple/dynamic-attributes.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/dynamic-attributes.ftl" />
 />
\ No newline at end of file

Modified: struts/struts2/trunk/core/src/main/resources/template/simple/inputtransferselect.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/simple/inputtransferselect.ftl?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/simple/inputtransferselect.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/simple/inputtransferselect.ftl Mon Oct 28 17:29:30 2013
@@ -55,8 +55,8 @@
 <#if parameters.title??>
  title="${parameters.title?html}"<#rt/>
 </#if>
-<#include "/${parameters.templateDir}/simple/scripting-events.ftl" />
-<#include "/${parameters.templateDir}/simple/common-attributes.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/scripting-events.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/common-attributes.ftl" />
 />
 
 

Modified: struts/struts2/trunk/core/src/main/resources/template/simple/label.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/simple/label.ftl?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/simple/label.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/simple/label.ftl Mon Oct 28 17:29:30 2013
@@ -36,10 +36,10 @@
 <#if parameters.for??>
  for="${parameters.for?html}"<#rt/>
 </#if>
-<#include "/${parameters.templateDir}/simple/common-attributes.ftl" />
-<#include "/${parameters.templateDir}/simple/dynamic-attributes.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/common-attributes.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/dynamic-attributes.ftl" />
 ><#rt/>
 <#if parameters.nameValue??>
 <@s.property value="parameters.nameValue"/><#t/>
 </#if>
-</label>
\ No newline at end of file
+</label>

Modified: struts/struts2/trunk/core/src/main/resources/template/simple/optgroup.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/simple/optgroup.ftl?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/simple/optgroup.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/simple/optgroup.ftl Mon Oct 28 17:29:30 2013
@@ -30,7 +30,7 @@
 	<#if optGroupInternalListUiBean.parameters.disabled?default(false)>
 	disabled="disabled"
 	</#if>
-<#include "/${parameters.templateDir}/simple/dynamic-attributes.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/dynamic-attributes.ftl" />
 >
 
 <#list optGroupInternalListUiBean.parameters.list as optGroupBean>

Modified: struts/struts2/trunk/core/src/main/resources/template/simple/password.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/simple/password.ftl?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/simple/password.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/simple/password.ftl Mon Oct 28 17:29:30 2013
@@ -43,11 +43,11 @@
 <#if parameters.id??>
  id="${parameters.id?html}"<#rt/>
 </#if>
-<#include "/${parameters.templateDir}/simple/css.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/css.ftl" />
 <#if parameters.title??>
  title="${parameters.title?html}"<#rt/>
 </#if>
-<#include "/${parameters.templateDir}/simple/scripting-events.ftl" />
-<#include "/${parameters.templateDir}/simple/common-attributes.ftl" />
-<#include "/${parameters.templateDir}/simple/dynamic-attributes.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/scripting-events.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/common-attributes.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/dynamic-attributes.ftl" />
 />
\ No newline at end of file

Modified: struts/struts2/trunk/core/src/main/resources/template/simple/radiomap.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/simple/radiomap.ftl?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/simple/radiomap.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/simple/radiomap.ftl Mon Oct 28 17:29:30 2013
@@ -91,12 +91,12 @@
  title="${parameters.title?html}"<#rt/>
     </#if>
 </#if>
-<#include "/${parameters.templateDir}/simple/css.ftl" />
-<#include "/${parameters.templateDir}/simple/scripting-events.ftl" />
-<#include "/${parameters.templateDir}/simple/common-attributes.ftl" />
-<#include "/${parameters.templateDir}/simple/dynamic-attributes.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/css.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/scripting-events.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/common-attributes.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/dynamic-attributes.ftl" />
 /><#rt/>
-<label for="${parameters.id?html}${itemKeyStr?html}"<#include "/${parameters.templateDir}/simple/css.ftl"/>><#rt/>
+<label for="${parameters.id?html}${itemKeyStr?html}"<#include "/${parameters.templateDir}/${parameters.expandTheme}/css.ftl"/>><#rt/>
     ${itemValue}<#t/>
 </label>
 </...@s.iterator>
\ No newline at end of file

Modified: struts/struts2/trunk/core/src/main/resources/template/simple/reset.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/simple/reset.ftl?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/simple/reset.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/simple/reset.ftl Mon Oct 28 17:29:30 2013
@@ -37,9 +37,9 @@
 <#if parameters.disabled?default(false)>
  disabled="disabled"<#rt/>
 </#if>
-<#include "/${parameters.templateDir}/simple/scripting-events.ftl"/>
-<#include "/${parameters.templateDir}/simple/common-attributes.ftl" />
-<#include "/${parameters.templateDir}/simple/dynamic-attributes.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/scripting-events.ftl"/>
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/common-attributes.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/dynamic-attributes.ftl" />
 ><#if parameters.src??>
 <img<#rt/>
 <#if parameters.label??>
@@ -69,8 +69,8 @@
 <#if parameters.disabled?default(false)>
  disabled="disabled"<#rt/>
 </#if>
-<#include "/${parameters.templateDir}/simple/scripting-events.ftl" />
-<#include "/${parameters.templateDir}/simple/common-attributes.ftl" />
-<#include "/${parameters.templateDir}/simple/dynamic-attributes.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/scripting-events.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/common-attributes.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/dynamic-attributes.ftl" />
 />
 </#if>
\ No newline at end of file

Modified: struts/struts2/trunk/core/src/main/resources/template/simple/select.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/simple/select.ftl?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/simple/select.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/simple/select.ftl Mon Oct 28 17:29:30 2013
@@ -35,16 +35,16 @@
 <#if parameters.id??>
  id="${parameters.id?html}"<#rt/>
 </#if>
-<#include "/${parameters.templateDir}/simple/css.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/css.ftl" />
 <#if parameters.title??>
  title="${parameters.title?html}"<#rt/>
 </#if>
 <#if parameters.multiple?default(false)>
  multiple="multiple"<#rt/>
 </#if>
-<#include "/${parameters.templateDir}/simple/scripting-events.ftl" />
-<#include "/${parameters.templateDir}/simple/common-attributes.ftl" />
-<#include "/${parameters.templateDir}/simple/dynamic-attributes.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/scripting-events.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/common-attributes.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/dynamic-attributes.ftl" />
 >
 <#if parameters.headerKey?? && parameters.headerValue??>
     <option value="${parameters.headerKey?html}"
@@ -115,7 +115,7 @@
     >${itemValue?html}</option><#lt/>
 </...@s.iterator>
 
-<#include "/${parameters.templateDir}/simple/optgroup.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/optgroup.ftl" />
 
 </select>
 
@@ -137,4 +137,4 @@
  disabled="disabled"<#rt/>
 </#if>
  />
-</#if>
\ No newline at end of file
+</#if>

Modified: struts/struts2/trunk/core/src/main/resources/template/simple/submit.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/simple/submit.ftl?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/simple/submit.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/simple/submit.ftl Mon Oct 28 17:29:30 2013
@@ -46,9 +46,9 @@
 <#if parameters.tabindex??>
  tabindex="${parameters.tabindex?html}"<#rt/>
 </#if>
-<#include "/${parameters.templateDir}/simple/scripting-events.ftl"/>
-<#include "/${parameters.templateDir}/simple/common-attributes.ftl" />
-<#include "/${parameters.templateDir}/simple/dynamic-attributes.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/scripting-events.ftl"/>
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/common-attributes.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/dynamic-attributes.ftl" />
 >
 <#else>
 <#if parameters.type?? && parameters.type=="image">
@@ -86,8 +86,8 @@
 <#if parameters.tabindex??>
  tabindex="${parameters.tabindex?html}"<#rt/>
 </#if>
-<#include "/${parameters.templateDir}/simple/scripting-events.ftl" />
-<#include "/${parameters.templateDir}/simple/common-attributes.ftl" />
-<#include "/${parameters.templateDir}/simple/dynamic-attributes.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/scripting-events.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/common-attributes.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/dynamic-attributes.ftl" />
 />
 </#if>
\ No newline at end of file

Modified: struts/struts2/trunk/core/src/main/resources/template/simple/text.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/simple/text.ftl?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/simple/text.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/simple/text.ftl Mon Oct 28 17:29:30 2013
@@ -44,11 +44,11 @@
 <#if parameters.id??>
  id="${parameters.id?html}"<#rt/>
 </#if>
-<#include "/${parameters.templateDir}/simple/css.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/css.ftl" />
 <#if parameters.title??>
  title="${parameters.title?html}"<#rt/>
 </#if>
-<#include "/${parameters.templateDir}/simple/scripting-events.ftl" />
-<#include "/${parameters.templateDir}/simple/common-attributes.ftl" />
-<#include "/${parameters.templateDir}/simple/dynamic-attributes.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/scripting-events.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/common-attributes.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/dynamic-attributes.ftl" />
 />
\ No newline at end of file

Modified: struts/struts2/trunk/core/src/main/resources/template/simple/textarea.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/simple/textarea.ftl?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/simple/textarea.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/simple/textarea.ftl Mon Oct 28 17:29:30 2013
@@ -39,15 +39,15 @@
 <#if parameters.id??>
  id="${parameters.id?html}"<#rt/>
 </#if>
-<#include "/${parameters.templateDir}/simple/css.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/css.ftl" />
 <#if parameters.title??>
  title="${parameters.title?html}"<#rt/>
 </#if>
-<#include "/${parameters.templateDir}/simple/scripting-events.ftl" />
-<#include "/${parameters.templateDir}/simple/common-attributes.ftl" />
-<#include "/${parameters.templateDir}/simple/dynamic-attributes.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/scripting-events.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/common-attributes.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/dynamic-attributes.ftl" />
 ><#rt/>
 <#if parameters.nameValue??>
 <@s.property value="parameters.nameValue"/><#t/>
 </#if>
-</textarea>
\ No newline at end of file
+</textarea>

Modified: struts/struts2/trunk/core/src/main/resources/template/xhtml/checkbox.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/xhtml/checkbox.ftl?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/xhtml/checkbox.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/xhtml/checkbox.ftl Mon Oct 28 17:29:30 2013
@@ -56,7 +56,7 @@ ${parameters.label?html}<#t/>
 </#if>
 :<#t/>
 <#if parameters.tooltip??>
-    <#include "/${parameters.templateDir}/xhtml/tooltip.ftl" />
+    <#include "/${parameters.templateDir}/${parameters.expandTheme}/tooltip.ftl" />
 </#if>
 </label><#t/>
 </#if>
@@ -88,7 +88,7 @@ ${parameters.label?html}<#t/>
 </#if>
 :<#t/>
 <#if parameters.tooltip??>
-    <#include "/${parameters.templateDir}/xhtml/tooltip.ftl" />
+    <#include "/${parameters.templateDir}/${parameters.expandTheme}/tooltip.ftl" />
 </#if>
 </label><#t/>
 </#if>
@@ -98,7 +98,7 @@ ${parameters.label?html}<#t/>
         <span class="required">*</span><#t/>
     </#if>
     <#if parameters.tooltip??>
-        <#include "/${parameters.templateDir}/xhtml/tooltip.ftl" />
+        <#include "/${parameters.templateDir}/${parameters.expandTheme}/tooltip.ftl" />
     </#if>
 </#if>
     </td>
@@ -121,4 +121,4 @@ ${parameters.label?html}<#t/>
 </#if>
 </#if>
 </#if>
- <#include "/${parameters.templateDir}/xhtml/controlfooter.ftl" /><#nt/>
+ <#include "/${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl" /><#nt/>

Modified: struts/struts2/trunk/core/src/main/resources/template/xhtml/checkboxlist.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/xhtml/checkboxlist.ftl?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/xhtml/checkboxlist.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/xhtml/checkboxlist.ftl Mon Oct 28 17:29:30 2013
@@ -20,7 +20,6 @@
  * under the License.
  */
 -->
-<#include "/${parameters.templateDir}/${parameters.theme}/controlheader.ftl" />
-
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl" />
 <#include "/${parameters.templateDir}/simple/checkboxlist.ftl" />
-    <#include "/${parameters.templateDir}/xhtml/controlfooter.ftl" /><#nt/>
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl" /><#nt/>

Modified: struts/struts2/trunk/core/src/main/resources/template/xhtml/combobox.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/xhtml/combobox.ftl?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/xhtml/combobox.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/xhtml/combobox.ftl Mon Oct 28 17:29:30 2013
@@ -20,7 +20,6 @@
  * under the License.
  */
 -->
-<#include "/${parameters.templateDir}/${parameters.theme}/controlheader.ftl" />
-
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl" />
 <#include "/${parameters.templateDir}/simple/combobox.ftl" />
-    <#include "/${parameters.templateDir}/xhtml/controlfooter.ftl" /><#nt/>
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl" /><#nt/>

Modified: struts/struts2/trunk/core/src/main/resources/template/xhtml/controlheader-core.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/xhtml/controlheader-core.ftl?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/xhtml/controlheader-core.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/xhtml/controlheader-core.ftl Mon Oct 28 17:29:30 2013
@@ -65,7 +65,7 @@ ${parameters.label?html}<#t/>
  <span class="required">*</span><#t/>
 </#if>
 ${parameters.labelseparator?default(":")?html}<#t/>
-<#include "/${parameters.templateDir}/xhtml/tooltip.ftl" /> 
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/tooltip.ftl" />
 </label><#t/>
 </#if>
     </td><#lt/>

Modified: struts/struts2/trunk/core/src/main/resources/template/xhtml/controlheader.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/xhtml/controlheader.ftl?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/xhtml/controlheader.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/xhtml/controlheader.ftl Mon Oct 28 17:29:30 2013
@@ -20,7 +20,7 @@
  * under the License.
  */
 -->
-<#include "/${parameters.templateDir}/xhtml/controlheader-core.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlheader-core.ftl" />
     <td
 <#if parameters.align??>
     align="${parameters.align?html}"<#t/>

Modified: struts/struts2/trunk/core/src/main/resources/template/xhtml/doubleselect.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/xhtml/doubleselect.ftl?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/xhtml/doubleselect.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/xhtml/doubleselect.ftl Mon Oct 28 17:29:30 2013
@@ -20,7 +20,6 @@
  * under the License.
  */
 -->
-<#include "/${parameters.templateDir}/${parameters.theme}/controlheader.ftl" />
-
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl" />
 <#include "/${parameters.templateDir}/simple/doubleselect.ftl" />
-    <#include "/${parameters.templateDir}/xhtml/controlfooter.ftl" /><#nt/>
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl" /><#nt/>

Modified: struts/struts2/trunk/core/src/main/resources/template/xhtml/file.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/xhtml/file.ftl?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/xhtml/file.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/xhtml/file.ftl Mon Oct 28 17:29:30 2013
@@ -20,6 +20,6 @@
  * under the License.
  */
 -->
-<#include "/${parameters.templateDir}/${parameters.theme}/controlheader.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl" />
 <#include "/${parameters.templateDir}/simple/file.ftl" />
-<#include "/${parameters.templateDir}/xhtml/controlfooter.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl" />

Modified: struts/struts2/trunk/core/src/main/resources/template/xhtml/form-close.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/xhtml/form-close.ftl?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/xhtml/form-close.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/xhtml/form-close.ftl Mon Oct 28 17:29:30 2013
@@ -20,9 +20,9 @@
  * under the License.
  */
 -->
-<#include "/${parameters.templateDir}/xhtml/control-close.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/control-close.ftl" />
 <#include "/${parameters.templateDir}/simple/form-close.ftl" />
-<#include "/${parameters.templateDir}/xhtml/form-close-validate.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/form-close-validate.ftl" />
 <#if parameters.focusElement?if_exists != "">
 <script type="text/javascript">
     StrutsUtils.addOnLoad(function() {

Modified: struts/struts2/trunk/core/src/main/resources/template/xhtml/form.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/xhtml/form.ftl?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/xhtml/form.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/xhtml/form.ftl Mon Oct 28 17:29:30 2013
@@ -20,8 +20,8 @@
  * under the License.
  */
 -->
-<#include "/${parameters.templateDir}/xhtml/form-validate.ftl" />
-<#include "/${parameters.templateDir}/simple/form-common.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/form-validate.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/form-common.ftl" />
 <#if (parameters.validate?default(false))>
   onreset="${parameters.onreset?default('clearErrorMessages(this);clearErrorLabels(this);')}"
 <#else>
@@ -30,4 +30,4 @@
   </#if>
 </#if>
 >
-<#include "/${parameters.templateDir}/xhtml/control.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/control.ftl" />

Modified: struts/struts2/trunk/core/src/main/resources/template/xhtml/inputtransferselect.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/xhtml/inputtransferselect.ftl?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/xhtml/inputtransferselect.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/xhtml/inputtransferselect.ftl Mon Oct 28 17:29:30 2013
@@ -20,6 +20,6 @@
  * under the License.
  */
 -->
-<#include "/${parameters.templateDir}/${parameters.theme}/controlheader.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl" />
 <#include "/${parameters.templateDir}/simple/inputtransferselect.ftl" />
-<#include "/${parameters.templateDir}/xhtml/controlfooter.ftl" /><#nt/>
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl" /><#nt/>

Modified: struts/struts2/trunk/core/src/main/resources/template/xhtml/label.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/xhtml/label.ftl?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/xhtml/label.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/xhtml/label.ftl Mon Oct 28 17:29:30 2013
@@ -20,6 +20,6 @@
  * under the License.
  */
 -->
-<#include "/${parameters.templateDir}/${parameters.theme}/controlheader.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl" />
 <#include "/${parameters.templateDir}/simple/label.ftl" />
-<#include "/${parameters.templateDir}/xhtml/controlfooter.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl" />

Modified: struts/struts2/trunk/core/src/main/resources/template/xhtml/optiontransferselect.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/xhtml/optiontransferselect.ftl?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/xhtml/optiontransferselect.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/xhtml/optiontransferselect.ftl Mon Oct 28 17:29:30 2013
@@ -20,6 +20,6 @@
  * under the License.
  */
 -->
-<#include "/${parameters.templateDir}/${parameters.theme}/controlheader.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl" />
 <#include "/${parameters.templateDir}/simple/optiontransferselect.ftl" />
-<#include "/${parameters.templateDir}/xhtml/controlfooter.ftl" /><#nt/>
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl" /><#nt/>

Modified: struts/struts2/trunk/core/src/main/resources/template/xhtml/password.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/xhtml/password.ftl?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/xhtml/password.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/xhtml/password.ftl Mon Oct 28 17:29:30 2013
@@ -20,6 +20,6 @@
  * under the License.
  */
 -->
-<#include "/${parameters.templateDir}/${parameters.theme}/controlheader.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl" />
 <#include "/${parameters.templateDir}/simple/password.ftl" />
-<#include "/${parameters.templateDir}/xhtml/controlfooter.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl" />

Modified: struts/struts2/trunk/core/src/main/resources/template/xhtml/radiomap.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/xhtml/radiomap.ftl?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/xhtml/radiomap.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/xhtml/radiomap.ftl Mon Oct 28 17:29:30 2013
@@ -20,7 +20,6 @@
  * under the License.
  */
 -->
-<#include "/${parameters.templateDir}/${parameters.theme}/controlheader.ftl" />
-
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl" />
 <#include "/${parameters.templateDir}/simple/radiomap.ftl" />
-    <#include "/${parameters.templateDir}/xhtml/controlfooter.ftl" /><#nt/>
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl" /><#nt/>

Modified: struts/struts2/trunk/core/src/main/resources/template/xhtml/reset.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/xhtml/reset.ftl?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/xhtml/reset.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/xhtml/reset.ftl Mon Oct 28 17:29:30 2013
@@ -28,4 +28,4 @@
 ><#t/>
 <#include "/${parameters.templateDir}/simple/reset.ftl" />
 </div><#t/>
-<#include "/${parameters.templateDir}/xhtml/controlfooter.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl" />

Modified: struts/struts2/trunk/core/src/main/resources/template/xhtml/select.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/xhtml/select.ftl?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/xhtml/select.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/xhtml/select.ftl Mon Oct 28 17:29:30 2013
@@ -20,6 +20,6 @@
  * under the License.
  */
 -->
-<#include "/${parameters.templateDir}/${parameters.theme}/controlheader.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl" />
 <#include "/${parameters.templateDir}/simple/select.ftl" />
-<#include "/${parameters.templateDir}/xhtml/controlfooter.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl" />

Modified: struts/struts2/trunk/core/src/main/resources/template/xhtml/submit-close.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/xhtml/submit-close.ftl?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/xhtml/submit-close.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/xhtml/submit-close.ftl Mon Oct 28 17:29:30 2013
@@ -1,3 +1,25 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
 <#include "/${parameters.templateDir}/simple/submit-close.ftl" />
 </div><#t/>
-<#include "/${parameters.templateDir}/xhtml/controlfooter.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl" />

Modified: struts/struts2/trunk/core/src/main/resources/template/xhtml/text.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/xhtml/text.ftl?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/xhtml/text.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/xhtml/text.ftl Mon Oct 28 17:29:30 2013
@@ -20,6 +20,6 @@
  * under the License.
  */
 -->
-<#include "/${parameters.templateDir}/${parameters.theme}/controlheader.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl" />
 <#include "/${parameters.templateDir}/simple/text.ftl" />
-<#include "/${parameters.templateDir}/xhtml/controlfooter.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl" />

Modified: struts/struts2/trunk/core/src/main/resources/template/xhtml/textarea.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/xhtml/textarea.ftl?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/xhtml/textarea.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/xhtml/textarea.ftl Mon Oct 28 17:29:30 2013
@@ -20,6 +20,6 @@
  * under the License.
  */
 -->
-<#include "/${parameters.templateDir}/${parameters.theme}/controlheader.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl" />
 <#include "/${parameters.templateDir}/simple/textarea.ftl" />
-<#include "/${parameters.templateDir}/xhtml/controlfooter.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl" />

Modified: struts/struts2/trunk/core/src/main/resources/template/xhtml/updownselect.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/xhtml/updownselect.ftl?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/xhtml/updownselect.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/xhtml/updownselect.ftl Mon Oct 28 17:29:30 2013
@@ -20,6 +20,6 @@
  * under the License.
  */
 -->
-<#include "/${parameters.templateDir}/${parameters.theme}/controlheader.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl" />
 <#include "/${parameters.templateDir}/simple/updownselect.ftl" />
-<#include "/${parameters.templateDir}/xhtml/controlfooter.ftl" /><#nt/>
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl" /><#nt/>

Modified: struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/freemarker/FreeMarkerResultTest.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/freemarker/FreeMarkerResultTest.java?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/freemarker/FreeMarkerResultTest.java (original)
+++ struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/freemarker/FreeMarkerResultTest.java Mon Oct 28 17:29:30 2013
@@ -196,15 +196,19 @@ public class FreeMarkerResultTest extend
 
         file = new File(ClassLoaderUtil.getResource("template/simple/css.ftl", getClass()).toURI());
         EasyMock.expect(servletContext.getRealPath("/template/simple/css.ftl")).andReturn(file.getAbsolutePath());
+        EasyMock.expect(servletContext.getRealPath("/template/~~~simple/css.ftl")).andReturn(file.getAbsolutePath());
 
         file = new File(ClassLoaderUtil.getResource("template/simple/scripting-events.ftl", getClass()).toURI());
         EasyMock.expect(servletContext.getRealPath("/template/simple/scripting-events.ftl")).andReturn(file.getAbsolutePath());
+        EasyMock.expect(servletContext.getRealPath("/template/~~~simple/scripting-events.ftl")).andReturn(file.getAbsolutePath());
 
         file = new File(ClassLoaderUtil.getResource("template/simple/common-attributes.ftl", getClass()).toURI());
         EasyMock.expect(servletContext.getRealPath("/template/simple/common-attributes.ftl")).andReturn(file.getAbsolutePath());
+        EasyMock.expect(servletContext.getRealPath("/template/~~~simple/common-attributes.ftl")).andReturn(file.getAbsolutePath());
 
         file = new File(ClassLoaderUtil.getResource("template/simple/dynamic-attributes.ftl", getClass()).toURI());
         EasyMock.expect(servletContext.getRealPath("/template/simple/dynamic-attributes.ftl")).andReturn(file.getAbsolutePath());
+        EasyMock.expect(servletContext.getRealPath("/template/~~~simple/dynamic-attributes.ftl")).andReturn(file.getAbsolutePath());
 
         EasyMock.expect(servletContext.getAttribute(FreemarkerManager.CONFIG_SERVLET_CONTEXT_KEY)).andReturn(freemarkerConfig).anyTimes();
         EasyMock.replay(servletContext);
@@ -253,15 +257,19 @@ public class FreeMarkerResultTest extend
 
         file = new File(ClassLoaderUtil.getResource("template/simple/css.ftl", getClass()).toURI());
         EasyMock.expect(servletContext.getRealPath("/template/simple/css.ftl")).andReturn(file.getAbsolutePath());
+        EasyMock.expect(servletContext.getRealPath("/template/~~~simple/css.ftl")).andReturn(file.getAbsolutePath());
 
         file = new File(ClassLoaderUtil.getResource("template/simple/scripting-events.ftl", getClass()).toURI());
         EasyMock.expect(servletContext.getRealPath("/template/simple/scripting-events.ftl")).andReturn(file.getAbsolutePath());
+        EasyMock.expect(servletContext.getRealPath("/template/~~~simple/scripting-events.ftl")).andReturn(file.getAbsolutePath());
 
         file = new File(ClassLoaderUtil.getResource("template/simple/common-attributes.ftl", getClass()).toURI());
         EasyMock.expect(servletContext.getRealPath("/template/simple/common-attributes.ftl")).andReturn(file.getAbsolutePath());
+        EasyMock.expect(servletContext.getRealPath("/template/~~~simple/common-attributes.ftl")).andReturn(file.getAbsolutePath());
 
         file = new File(ClassLoaderUtil.getResource("template/simple/dynamic-attributes.ftl", getClass()).toURI());
         EasyMock.expect(servletContext.getRealPath("/template/simple/dynamic-attributes.ftl")).andReturn(file.getAbsolutePath());
+        EasyMock.expect(servletContext.getRealPath("/template/~~~simple/dynamic-attributes.ftl")).andReturn(file.getAbsolutePath());
 
         EasyMock.expect(servletContext.getAttribute(FreemarkerManager.CONFIG_SERVLET_CONTEXT_KEY)).andReturn(freemarkerConfig).anyTimes();
         EasyMock.replay(servletContext);
@@ -316,6 +324,9 @@ public class FreeMarkerResultTest extend
         DefaultFileManagerFactory factory = new DefaultFileManagerFactory();
         container.inject(factory);
         mgr.setFileManagerFactory(factory);
+        FreemarkerThemeTemplateLoader themeLoader = new FreemarkerThemeTemplateLoader();
+        container.inject(themeLoader);
+        mgr.setThemeTemplateLoader(themeLoader);
         stringWriter = new StringWriter();
         writer = new PrintWriter(stringWriter);
         response = new StrutsMockHttpServletResponse();

Modified: struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/freemarker/FreemarkerManagerTest.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/freemarker/FreemarkerManagerTest.java?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/freemarker/FreemarkerManagerTest.java (original)
+++ struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/freemarker/FreemarkerManagerTest.java Mon Oct 28 17:29:30 2013
@@ -37,6 +37,7 @@ public class FreemarkerManagerTest exten
         DefaultFileManagerFactory factory = new DefaultFileManagerFactory();
         container.inject(factory);
         mgr.setFileManagerFactory(factory);
+        mgr.setThemeTemplateLoader(new FreemarkerThemeTemplateLoader());
         StrutsMockServletContext servletContext = new StrutsMockServletContext();
         servletContext.setAttribute(FreemarkerManager.CONFIG_SERVLET_CONTEXT_KEY, null);
         freemarker.template.Configuration conf = mgr.getConfiguration(servletContext);

Modified: struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/freemarker/dynaAttributes.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/freemarker/dynaAttributes.ftl?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/freemarker/dynaAttributes.ftl (original)
+++ struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/freemarker/dynaAttributes.ftl Mon Oct 28 17:29:30 2013
@@ -20,7 +20,7 @@
  * under the License.
  */
 -->
-<@s.textfield name="test" dynamicAttributes={"placeholder":"input","foo":"bar"}/>
-<@s.textfield name="test" placeholder="input" foo="bar"/>
-<@s.textfield name="test" break=true />
-<@s.textfield name="required" required=true />
+<@s.textfield name="test" theme="simple" dynamicAttributes={"placeholder":"input","foo":"bar"}/>
+<@s.textfield name="test" theme="simple" placeholder="input" foo="bar"/>
+<@s.textfield name="test" theme="simple" break=true />
+<@s.textfield name="required" theme="simple" required=true />

Modified: struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/freemarker/manual-list.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/freemarker/manual-list.ftl?rev=1536435&r1=1536434&r2=1536435&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/freemarker/manual-list.ftl (original)
+++ struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/freemarker/manual-list.ftl Mon Oct 28 17:29:30 2013
@@ -20,6 +20,6 @@
  * under the License.
  */
 -->
-<@s.radio name="client" id="client_" list='{"foo", "bar"}' />
+<@s.radio theme="simple" name="client" id="client_" list='{"foo", "bar"}' />
 
-<@s.radio name="car" list={"ford": "Ford Motor Co", "toyota": "Toyota"} listKey="key" listValue="value" />
+<@s.radio theme="simple" name="car" list={"ford": "Ford Motor Co", "toyota": "Toyota"} listKey="key" listValue="value" />