diff --git a/core/src/main/java/org/apache/struts2/StrutsConstants.java b/core/src/main/java/org/apache/struts2/StrutsConstants.java
index 53e2ee867..732b96046 100644
--- a/core/src/main/java/org/apache/struts2/StrutsConstants.java
+++ b/core/src/main/java/org/apache/struts2/StrutsConstants.java
@@ -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";
diff --git a/core/src/main/java/org/apache/struts2/components/UIBean.java b/core/src/main/java/org/apache/struts2/components/UIBean.java
index 6d9b826e9..9418a6e1d 100644
--- a/core/src/main/java/org/apache/struts2/components/UIBean.java
+++ b/core/src/main/java/org/apache/struts2/components/UIBean.java
@@ -84,6 +84,21 @@ import java.util.concurrent.ConcurrentMap;
*
String
*
define the template name
*
+ *
+ *
themeExpansionToken
+ *
n/a
+ *
String
+ *
special token (defined with struts.ui.theme.expansion.token) used to search for template in parent theme
+ * (don't use it separately!)
+ *
+ *
+ *
expandTheme
+ *
n/a
+ *
String
+ *
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 <#include/> directive
+ *
*
*
*
@@ -499,6 +514,7 @@ public abstract class UIBean extends Component {
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 Component {
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 Component {
}
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;
diff --git a/core/src/main/java/org/apache/struts2/components/template/FreemarkerTemplateEngine.java b/core/src/main/java/org/apache/struts2/components/template/FreemarkerTemplateEngine.java
index 2e3b84c4c..9368ec716 100644
--- a/core/src/main/java/org/apache/struts2/components/template/FreemarkerTemplateEngine.java
+++ b/core/src/main/java/org/apache/struts2/components/template/FreemarkerTemplateEngine.java
@@ -23,6 +23,7 @@ package org.apache.struts2.components.template;
import java.io.IOException;
import java.io.Writer;
+import java.util.Locale;
import java.util.Map;
import java.util.List;
diff --git a/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java b/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java
index bc233dddb..4a122ec14 100644
--- a/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java
+++ b/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java
@@ -179,6 +179,7 @@ public class FreemarkerManager {
protected Map 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.
*
@@ -321,8 +332,7 @@ public class FreemarkerManager {
if (encoding != null) {
configuration.setDefaultEncoding(encoding);
}
-
-
+ configuration.setLocalizedLookup(false);
configuration.setWhitespaceStripping(true);
return configuration;
diff --git a/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerThemeTemplateLoader.java b/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerThemeTemplateLoader.java
new file mode 100644
index 000000000..35a90a45d
--- /dev/null
+++ b/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerThemeTemplateLoader.java
@@ -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 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;
+ }
+}
diff --git a/core/src/main/resources/org/apache/struts2/default.properties b/core/src/main/resources/org/apache/struts2/default.properties
index 1abb1f3b8..ea3bc0cc4 100644
--- a/core/src/main/resources/org/apache/struts2/default.properties
+++ b/core/src/main/resources/org/apache/struts2/default.properties
@@ -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
diff --git a/core/src/main/resources/struts-default.xml b/core/src/main/resources/struts-default.xml
index c188783ee..7536b5759 100644
--- a/core/src/main/resources/struts-default.xml
+++ b/core/src/main/resources/struts-default.xml
@@ -65,6 +65,7 @@
+
diff --git a/core/src/main/resources/template/css_xhtml/checkboxlist.ftl b/core/src/main/resources/template/css_xhtml/checkboxlist.ftl
deleted file mode 100644
index e05ee0fe2..000000000
--- a/core/src/main/resources/template/css_xhtml/checkboxlist.ftl
+++ /dev/null
@@ -1,26 +0,0 @@
-<#--
-/*
- * $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}/css_xhtml/controlheader.ftl" /-->
-<#include "/${parameters.templateDir}/${parameters.theme}/controlheader.ftl" />
-<#include "/${parameters.templateDir}/simple/checkboxlist.ftl" />
-<#include "/${parameters.templateDir}/css_xhtml/controlfooter.ftl" /><#nt/>
diff --git a/core/src/main/resources/template/css_xhtml/combobox.ftl b/core/src/main/resources/template/css_xhtml/combobox.ftl
deleted file mode 100644
index b868c2df1..000000000
--- a/core/src/main/resources/template/css_xhtml/combobox.ftl
+++ /dev/null
@@ -1,26 +0,0 @@
-<#--
-/*
- * $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}/css_xhtml/controlheader.ftl" /-->
-<#include "/${parameters.templateDir}/${parameters.theme}/controlheader.ftl" />
-<#include "/${parameters.templateDir}/simple/combobox.ftl" />
-<#include "/${parameters.templateDir}/css_xhtml/controlfooter.ftl" /><#nt/>
diff --git a/core/src/main/resources/template/css_xhtml/controlheader.ftl b/core/src/main/resources/template/css_xhtml/controlheader.ftl
index 717fd48f8..4099c7a2d 100644
--- a/core/src/main/resources/template/css_xhtml/controlheader.ftl
+++ b/core/src/main/resources/template/css_xhtml/controlheader.ftl
@@ -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'>
<#else>
#if>
<#if parameters.id??>id="wwctrl_${parameters.id}"<#rt/>#if> class="wwctrl">
-
\ No newline at end of file
+
diff --git a/core/src/main/resources/template/css_xhtml/debug.ftl b/core/src/main/resources/template/css_xhtml/debug.ftl
deleted file mode 100644
index 63dcefcd7..000000000
--- a/core/src/main/resources/template/css_xhtml/debug.ftl
+++ /dev/null
@@ -1,23 +0,0 @@
-<#--
-/*
- * $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/debug.ftl" />
diff --git a/core/src/main/resources/template/css_xhtml/doubleselect.ftl b/core/src/main/resources/template/css_xhtml/doubleselect.ftl
deleted file mode 100644
index 71dc767eb..000000000
--- a/core/src/main/resources/template/css_xhtml/doubleselect.ftl
+++ /dev/null
@@ -1,26 +0,0 @@
-<#--
-/*
- * $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}/css_xhtml/controlheader.ftl" /-->
-<#include "/${parameters.templateDir}/${parameters.theme}/controlheader.ftl" />
-<#include "/${parameters.templateDir}/simple/doubleselect.ftl" />
-<#include "/${parameters.templateDir}/css_xhtml/controlfooter.ftl" /><#nt/>
diff --git a/core/src/main/resources/template/css_xhtml/file.ftl b/core/src/main/resources/template/css_xhtml/file.ftl
deleted file mode 100644
index 6227ec0a8..000000000
--- a/core/src/main/resources/template/css_xhtml/file.ftl
+++ /dev/null
@@ -1,26 +0,0 @@
-<#--
-/*
- * $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}/css_xhtml/controlheader.ftl" /-->
-<#include "/${parameters.templateDir}/${parameters.theme}/controlheader.ftl" />
-<#include "/${parameters.templateDir}/simple/file.ftl" />
-<#include "/${parameters.templateDir}/css_xhtml/controlfooter.ftl" />
diff --git a/core/src/main/resources/template/css_xhtml/form-close.ftl b/core/src/main/resources/template/css_xhtml/form-close.ftl
deleted file mode 100644
index 1d8eb9d12..000000000
--- a/core/src/main/resources/template/css_xhtml/form-close.ftl
+++ /dev/null
@@ -1,35 +0,0 @@
-<#--
-/*
- * $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}/css_xhtml/control-close.ftl" />
-<#include "/${parameters.templateDir}/simple/form-close.ftl" />
-<#include "/${parameters.templateDir}/xhtml/form-close-validate.ftl" />
-<#if parameters.focusElement?if_exists != "">
-
-#if>
diff --git a/core/src/main/resources/template/css_xhtml/form.ftl b/core/src/main/resources/template/css_xhtml/form.ftl
deleted file mode 100644
index 56df8982f..000000000
--- a/core/src/main/resources/template/css_xhtml/form.ftl
+++ /dev/null
@@ -1,33 +0,0 @@
-<#--
-/*
- * $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}/css_xhtml/form-validate.ftl" />
-<#include "/${parameters.templateDir}/simple/form-common.ftl" />
-<#if (parameters.validate?default(false))>
- onreset="${parameters.onreset?default('clearErrorMessages(this);clearErrorLabels(this);')}"
-<#else>
- <#if parameters.onreset??>
- onreset="${parameters.onreset?html}"
- #if>
-#if>
->
-<#include "/${parameters.templateDir}/css_xhtml/control.ftl">
diff --git a/core/src/main/resources/template/css_xhtml/inputtransferselect.ftl b/core/src/main/resources/template/css_xhtml/inputtransferselect.ftl
deleted file mode 100644
index 38041d1e7..000000000
--- a/core/src/main/resources/template/css_xhtml/inputtransferselect.ftl
+++ /dev/null
@@ -1,26 +0,0 @@
-<#--
-/*
- * $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}/css_xhtml/controlheader.ftl" /-->
-<#include "/${parameters.templateDir}/${parameters.theme}/controlheader.ftl" />
-<#include "/${parameters.templateDir}/simple/inputtransferselect.ftl" />
-<#include "/${parameters.templateDir}/css_xhtml/controlfooter.ftl" />
diff --git a/core/src/main/resources/template/css_xhtml/label.ftl b/core/src/main/resources/template/css_xhtml/label.ftl
index 7c73dd878..748fee51c 100644
--- a/core/src/main/resources/template/css_xhtml/label.ftl
+++ b/core/src/main/resources/template/css_xhtml/label.ftl
@@ -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" />
<#if parameters.id??>
id="${parameters.id?html}"<#rt/>
@@ -44,4 +44,4 @@
#if>
-<#include "/${parameters.templateDir}/css_xhtml/controlfooter.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl" />
diff --git a/core/src/main/resources/template/css_xhtml/optiontransferselect.ftl b/core/src/main/resources/template/css_xhtml/optiontransferselect.ftl
deleted file mode 100644
index 1b3af9fd5..000000000
--- a/core/src/main/resources/template/css_xhtml/optiontransferselect.ftl
+++ /dev/null
@@ -1,26 +0,0 @@
-<#--
-/*
- * $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}/css_xhtml/controlheader.ftl" /-->
-<#include "/${parameters.templateDir}/${parameters.theme}/controlheader.ftl" />
-<#include "/${parameters.templateDir}/simple/optiontransferselect.ftl" />
-<#include "/${parameters.templateDir}/css_xhtml/controlfooter.ftl" />
diff --git a/core/src/main/resources/template/css_xhtml/password.ftl b/core/src/main/resources/template/css_xhtml/password.ftl
deleted file mode 100644
index 71cf6f14b..000000000
--- a/core/src/main/resources/template/css_xhtml/password.ftl
+++ /dev/null
@@ -1,26 +0,0 @@
-<#--
-/*
- * $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}/css_xhtml/controlheader.ftl" /-->
-<#include "/${parameters.templateDir}/${parameters.theme}/controlheader.ftl" />
-<#include "/${parameters.templateDir}/simple/password.ftl" />
-<#include "/${parameters.templateDir}/css_xhtml/controlfooter.ftl" />
diff --git a/core/src/main/resources/template/css_xhtml/radiomap.ftl b/core/src/main/resources/template/css_xhtml/radiomap.ftl
deleted file mode 100644
index 40f0eefbe..000000000
--- a/core/src/main/resources/template/css_xhtml/radiomap.ftl
+++ /dev/null
@@ -1,27 +0,0 @@
-<#--
-/*
- * $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}/css_xhtml/controlheader.ftl" /-->
-<#include "/${parameters.templateDir}/${parameters.theme}/controlheader.ftl" />
-<#include "/${parameters.templateDir}/simple/radiomap.ftl" />
-<#include "/${parameters.templateDir}/css_xhtml/controlfooter.ftl" />
-<#nt/>
diff --git a/core/src/main/resources/template/css_xhtml/select.ftl b/core/src/main/resources/template/css_xhtml/select.ftl
deleted file mode 100644
index f3c0804e4..000000000
--- a/core/src/main/resources/template/css_xhtml/select.ftl
+++ /dev/null
@@ -1,26 +0,0 @@
-<#--
-/*
- * $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}/css_xhtml/controlheader.ftl" /-->
-<#include "/${parameters.templateDir}/${parameters.theme}/controlheader.ftl" />
-<#include "/${parameters.templateDir}/simple/select.ftl" />
-<#include "/${parameters.templateDir}/css_xhtml/controlfooter.ftl" />
diff --git a/core/src/main/resources/template/css_xhtml/text.ftl b/core/src/main/resources/template/css_xhtml/text.ftl
deleted file mode 100644
index d07ab2f24..000000000
--- a/core/src/main/resources/template/css_xhtml/text.ftl
+++ /dev/null
@@ -1,26 +0,0 @@
-<#--
-/*
- * $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}/css_xhtml/controlheader.ftl" / -->
-<#include "/${parameters.templateDir}/${parameters.theme}/controlheader.ftl" />
-<#include "/${parameters.templateDir}/simple/text.ftl" />
-<#include "/${parameters.templateDir}/css_xhtml/controlfooter.ftl" />
diff --git a/core/src/main/resources/template/css_xhtml/textarea.ftl b/core/src/main/resources/template/css_xhtml/textarea.ftl
deleted file mode 100644
index 5b0bb59ab..000000000
--- a/core/src/main/resources/template/css_xhtml/textarea.ftl
+++ /dev/null
@@ -1,26 +0,0 @@
-<#--
-/*
- * $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}/css_xhtml/controlheader.ftl" /-->
-<#include "/${parameters.templateDir}/${parameters.theme}/controlheader.ftl" />
-<#include "/${parameters.templateDir}/simple/textarea.ftl" />
-<#include "/${parameters.templateDir}/css_xhtml/controlfooter.ftl" />
diff --git a/core/src/main/resources/template/css_xhtml/updownselect.ftl b/core/src/main/resources/template/css_xhtml/updownselect.ftl
deleted file mode 100644
index 307f3bb45..000000000
--- a/core/src/main/resources/template/css_xhtml/updownselect.ftl
+++ /dev/null
@@ -1,26 +0,0 @@
-<#--
-/*
- * $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}/css_xhtml/controlheader.ftl" /-->
-<#include "/${parameters.templateDir}/${parameters.theme}/controlheader.ftl" />
-<#include "/${parameters.templateDir}/simple/updownselect.ftl" />
-<#include "/${parameters.templateDir}/css_xhtml/controlfooter.ftl" />
diff --git a/core/src/main/resources/template/simple/a-close.ftl b/core/src/main/resources/template/simple/a-close.ftl
index 8ec849944..84b5aaeb4 100644
--- a/core/src/main/resources/template/simple/a-close.ftl
+++ b/core/src/main/resources/template/simple/a-close.ftl
@@ -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}
\ No newline at end of file
diff --git a/core/src/main/resources/template/simple/checkbox.ftl b/core/src/main/resources/template/simple/checkbox.ftl
index 714929a17..1ef6b03b1 100644
--- a/core/src/main/resources/template/simple/checkbox.ftl
+++ b/core/src/main/resources/template/simple/checkbox.ftl
@@ -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" />
/>
<#if parameters.disabled?default(false)>
disabled="disabled"<#rt/>
#if>
- />
\ No newline at end of file
+ />
diff --git a/core/src/main/resources/template/simple/checkboxlist.ftl b/core/src/main/resources/template/simple/checkboxlist.ftl
index 78eb11f9d..6c1f9a722 100644
--- a/core/src/main/resources/template/simple/checkboxlist.ftl
+++ b/core/src/main/resources/template/simple/checkboxlist.ftl
@@ -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" />
/>
@s.iterator>
@@ -99,4 +99,4 @@
<#if parameters.disabled?default(false)>
disabled="disabled"<#rt/>
#if>
- />
\ No newline at end of file
+ />
diff --git a/core/src/main/resources/template/simple/combobox.ftl b/core/src/main/resources/template/simple/combobox.ftl
index 2eba696a8..760ad7116 100644
--- a/core/src/main/resources/template/simple/combobox.ftl
+++ b/core/src/main/resources/template/simple/combobox.ftl
@@ -39,7 +39,7 @@
<#if parameters.list??>
-<#include "/${parameters.templateDir}/simple/css.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/css.ftl" />
<#if parameters.disabled?default(false)>
disabled="disabled"<#rt/>
#if>
diff --git a/core/src/main/resources/template/simple/div.ftl b/core/src/main/resources/template/simple/div.ftl
index 8a870000b..5c9365a02 100644
--- a/core/src/main/resources/template/simple/div.ftl
+++ b/core/src/main/resources/template/simple/div.ftl
@@ -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
diff --git a/core/src/main/resources/template/simple/file.ftl b/core/src/main/resources/template/simple/file.ftl
index 4af68727a..c7b7a83db 100644
--- a/core/src/main/resources/template/simple/file.ftl
+++ b/core/src/main/resources/template/simple/file.ftl
@@ -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
diff --git a/core/src/main/resources/template/simple/form-common.ftl b/core/src/main/resources/template/simple/form-common.ftl
index 91cbbcc2a..a2119b9fe 100644
--- a/core/src/main/resources/template/simple/form-common.ftl
+++ b/core/src/main/resources/template/simple/form-common.ftl
@@ -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
diff --git a/core/src/main/resources/template/simple/form.ftl b/core/src/main/resources/template/simple/form.ftl
index 5f82ba5ef..f02eea9c6 100644
--- a/core/src/main/resources/template/simple/form.ftl
+++ b/core/src/main/resources/template/simple/form.ftl
@@ -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
+>
diff --git a/core/src/main/resources/template/simple/hidden.ftl b/core/src/main/resources/template/simple/hidden.ftl
index 403cbfb90..4f912377e 100644
--- a/core/src/main/resources/template/simple/hidden.ftl
+++ b/core/src/main/resources/template/simple/hidden.ftl
@@ -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
diff --git a/core/src/main/resources/template/simple/inputtransferselect.ftl b/core/src/main/resources/template/simple/inputtransferselect.ftl
index d80824c65..610eeb2aa 100644
--- a/core/src/main/resources/template/simple/inputtransferselect.ftl
+++ b/core/src/main/resources/template/simple/inputtransferselect.ftl
@@ -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" />
/>
diff --git a/core/src/main/resources/template/simple/label.ftl b/core/src/main/resources/template/simple/label.ftl
index ff3c0e031..53524d4c5 100644
--- a/core/src/main/resources/template/simple/label.ftl
+++ b/core/src/main/resources/template/simple/label.ftl
@@ -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>
-
\ No newline at end of file
+
diff --git a/core/src/main/resources/template/simple/optgroup.ftl b/core/src/main/resources/template/simple/optgroup.ftl
index 3378db6fb..6d503b79e 100644
--- a/core/src/main/resources/template/simple/optgroup.ftl
+++ b/core/src/main/resources/template/simple/optgroup.ftl
@@ -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>
diff --git a/core/src/main/resources/template/simple/password.ftl b/core/src/main/resources/template/simple/password.ftl
index 6b99d6a9f..b036b923a 100644
--- a/core/src/main/resources/template/simple/password.ftl
+++ b/core/src/main/resources/template/simple/password.ftl
@@ -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
diff --git a/core/src/main/resources/template/simple/radiomap.ftl b/core/src/main/resources/template/simple/radiomap.ftl
index 914355ea1..ab6d42cff 100644
--- a/core/src/main/resources/template/simple/radiomap.ftl
+++ b/core/src/main/resources/template/simple/radiomap.ftl
@@ -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/>
-><#rt/>
+><#rt/>
${itemValue}<#t/>
@s.iterator>
\ No newline at end of file
diff --git a/core/src/main/resources/template/simple/reset.ftl b/core/src/main/resources/template/simple/reset.ftl
index e7a11db9e..0ddba57aa 100644
--- a/core/src/main/resources/template/simple/reset.ftl
+++ b/core/src/main/resources/template/simple/reset.ftl
@@ -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??>
<#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
diff --git a/core/src/main/resources/template/simple/select.ftl b/core/src/main/resources/template/simple/select.ftl
index 712289441..74277e6ae 100644
--- a/core/src/main/resources/template/simple/select.ftl
+++ b/core/src/main/resources/template/simple/select.ftl
@@ -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??>
<#lt/>
@s.iterator>
-<#include "/${parameters.templateDir}/simple/optgroup.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/optgroup.ftl" />
@@ -137,4 +137,4 @@
disabled="disabled"<#rt/>
#if>
/>
-#if>
\ No newline at end of file
+#if>
diff --git a/core/src/main/resources/template/simple/submit.ftl b/core/src/main/resources/template/simple/submit.ftl
index eb2d84384..95315ef5e 100644
--- a/core/src/main/resources/template/simple/submit.ftl
+++ b/core/src/main/resources/template/simple/submit.ftl
@@ -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
diff --git a/core/src/main/resources/template/simple/text.ftl b/core/src/main/resources/template/simple/text.ftl
index 276737808..1caf3aa5d 100644
--- a/core/src/main/resources/template/simple/text.ftl
+++ b/core/src/main/resources/template/simple/text.ftl
@@ -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
diff --git a/core/src/main/resources/template/simple/textarea.ftl b/core/src/main/resources/template/simple/textarea.ftl
index cb3fa0bef..6cf1e9b0d 100644
--- a/core/src/main/resources/template/simple/textarea.ftl
+++ b/core/src/main/resources/template/simple/textarea.ftl
@@ -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>
-
\ No newline at end of file
+
diff --git a/core/src/main/resources/template/xhtml/checkbox.ftl b/core/src/main/resources/template/xhtml/checkbox.ftl
index 10cdd3d1f..878c63236 100644
--- a/core/src/main/resources/template/xhtml/checkbox.ftl
+++ b/core/src/main/resources/template/xhtml/checkbox.ftl
@@ -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>
<#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>
<#t/>
#if>
@@ -98,7 +98,7 @@ ${parameters.label?html}<#t/>
*<#t/>
#if>
<#if parameters.tooltip??>
- <#include "/${parameters.templateDir}/xhtml/tooltip.ftl" />
+ <#include "/${parameters.templateDir}/${parameters.expandTheme}/tooltip.ftl" />
#if>
#if>
@@ -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/>
diff --git a/core/src/main/resources/template/xhtml/checkboxlist.ftl b/core/src/main/resources/template/xhtml/checkboxlist.ftl
index 8c056b3af..8cc0dd8f2 100644
--- a/core/src/main/resources/template/xhtml/checkboxlist.ftl
+++ b/core/src/main/resources/template/xhtml/checkboxlist.ftl
@@ -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/>
diff --git a/core/src/main/resources/template/xhtml/combobox.ftl b/core/src/main/resources/template/xhtml/combobox.ftl
index fa8ccbc6d..a1a85f181 100644
--- a/core/src/main/resources/template/xhtml/combobox.ftl
+++ b/core/src/main/resources/template/xhtml/combobox.ftl
@@ -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/>
diff --git a/core/src/main/resources/template/xhtml/controlheader-core.ftl b/core/src/main/resources/template/xhtml/controlheader-core.ftl
index a73d9aac3..f909c89f0 100644
--- a/core/src/main/resources/template/xhtml/controlheader-core.ftl
+++ b/core/src/main/resources/template/xhtml/controlheader-core.ftl
@@ -65,7 +65,7 @@ ${parameters.label?html}<#t/>
*<#t/>
#if>
${parameters.labelseparator?default(":")?html}<#t/>
-<#include "/${parameters.templateDir}/xhtml/tooltip.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/tooltip.ftl" />
<#t/>
#if>
<#lt/>
diff --git a/core/src/main/resources/template/xhtml/controlheader.ftl b/core/src/main/resources/template/xhtml/controlheader.ftl
index 3eb4c0a83..4a150586e 100644
--- a/core/src/main/resources/template/xhtml/controlheader.ftl
+++ b/core/src/main/resources/template/xhtml/controlheader.ftl
@@ -20,7 +20,7 @@
* under the License.
*/
-->
-<#include "/${parameters.templateDir}/xhtml/controlheader-core.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlheader-core.ftl" />
align="${parameters.align?html}"<#t/>
diff --git a/core/src/main/resources/template/xhtml/debug.ftl b/core/src/main/resources/template/xhtml/debug.ftl
deleted file mode 100644
index 63dcefcd7..000000000
--- a/core/src/main/resources/template/xhtml/debug.ftl
+++ /dev/null
@@ -1,23 +0,0 @@
-<#--
-/*
- * $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/debug.ftl" />
diff --git a/core/src/main/resources/template/xhtml/doubleselect.ftl b/core/src/main/resources/template/xhtml/doubleselect.ftl
index b04fd9aef..f923462cb 100644
--- a/core/src/main/resources/template/xhtml/doubleselect.ftl
+++ b/core/src/main/resources/template/xhtml/doubleselect.ftl
@@ -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/>
diff --git a/core/src/main/resources/template/xhtml/file.ftl b/core/src/main/resources/template/xhtml/file.ftl
index 6d26e6411..cae4a2e43 100644
--- a/core/src/main/resources/template/xhtml/file.ftl
+++ b/core/src/main/resources/template/xhtml/file.ftl
@@ -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" />
diff --git a/core/src/main/resources/template/xhtml/form-close.ftl b/core/src/main/resources/template/xhtml/form-close.ftl
index b000f91ed..d783454b8 100644
--- a/core/src/main/resources/template/xhtml/form-close.ftl
+++ b/core/src/main/resources/template/xhtml/form-close.ftl
@@ -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 != "">