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 2014/03/19 08:52:32 UTC

[07/14] git commit: Extends Hidden to support xhtml theme properly

Extends Hidden to support xhtml theme properly


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/cdf3c5cb
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/cdf3c5cb
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/cdf3c5cb

Branch: refs/heads/feature/WW-4187-correctly-identify-protocols
Commit: cdf3c5cbf120d984049bb6d292193d8620d52639
Parents: aa744b8
Author: Lukasz Lenart <lu...@apache.org>
Authored: Thu Mar 13 20:17:01 2014 +0100
Committer: Lukasz Lenart <lu...@apache.org>
Committed: Thu Mar 13 20:17:01 2014 +0100

----------------------------------------------------------------------
 .../org/apache/struts2/components/Hidden.java   |  7 ++++++
 .../main/resources/template/xhtml/hidden.ftl    | 25 ++++++++++++++++++++
 2 files changed, 32 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/cdf3c5cb/core/src/main/java/org/apache/struts2/components/Hidden.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/struts2/components/Hidden.java b/core/src/main/java/org/apache/struts2/components/Hidden.java
index 62efc44..36b03d1 100644
--- a/core/src/main/java/org/apache/struts2/components/Hidden.java
+++ b/core/src/main/java/org/apache/struts2/components/Hidden.java
@@ -65,4 +65,11 @@ public class Hidden extends UIBean {
     protected String getDefaultTemplate() {
         return TEMPLATE;
     }
+
+    @Override
+    public void evaluateParams() {
+        super.evaluateParams();
+        label = null;
+        addParameter("label", null);
+    }
 }

http://git-wip-us.apache.org/repos/asf/struts/blob/cdf3c5cb/core/src/main/resources/template/xhtml/hidden.ftl
----------------------------------------------------------------------
diff --git a/core/src/main/resources/template/xhtml/hidden.ftl b/core/src/main/resources/template/xhtml/hidden.ftl
new file mode 100644
index 0000000..3ff0f05
--- /dev/null
+++ b/core/src/main/resources/template/xhtml/hidden.ftl
@@ -0,0 +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}/${parameters.expandTheme}/controlheader.ftl" />
+<#include "/${parameters.templateDir}/simple/hidden.ftl" />
+<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl" />