[1/3] git commit: Adds onClick handler to support action: prefix

2014-03-13 Thread lukaszlenart
Repository: struts
Updated Branches:
  refs/heads/feature/use-js-to-support-multiple-buttons [created] 83bdfcb57


Adds onClick handler to support action: prefix


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

Branch: refs/heads/feature/use-js-to-support-multiple-buttons
Commit: ca911367280eb525461439be6ed17022c89b8169
Parents: bcd61a0
Author: Lukasz Lenart 
Authored: Thu Mar 13 09:21:29 2014 +0100
Committer: Lukasz Lenart 
Committed: Thu Mar 13 09:21:29 2014 +0100

--
 .../org/apache/struts2/components/FormButton.java  | 17 +
 1 file changed, 17 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/ca911367/core/src/main/java/org/apache/struts2/components/FormButton.java
--
diff --git a/core/src/main/java/org/apache/struts2/components/FormButton.java 
b/core/src/main/java/org/apache/struts2/components/FormButton.java
index 2bd66c3..0671862 100644
--- a/core/src/main/java/org/apache/struts2/components/FormButton.java
+++ b/core/src/main/java/org/apache/struts2/components/FormButton.java
@@ -24,6 +24,7 @@ package org.apache.struts2.components;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import org.apache.commons.lang3.RandomStringUtils;
 import org.apache.struts2.views.annotations.StrutsTagAttribute;
 import org.apache.struts2.dispatcher.mapper.ActionMapper;
 import org.apache.struts2.dispatcher.mapper.ActionMapping;
@@ -81,6 +82,7 @@ public abstract class FormButton extends ClosingUIBean {
 }
 mapping.setExtension("");
 name = "action:" + 
actionMapper.getUriFromActionMapping(mapping);
+applyOnClickHandler();
 } else {
 name = "method:" + findString(method);
 }
@@ -92,6 +94,21 @@ public abstract class FormButton extends ClosingUIBean {
 
 }
 
+protected void applyOnClickHandler() {
+String onClick = (String) parameters.get("onclick");
+String submitId = (String) parameters.get("id");
+if (submitId == null) {
+submitId = RandomStringUtils.randomAlphanumeric(12);
+}
+String clickHandler = "submitAction_" + submitId + "(this);";
+if (onClick != null && !onClick.contains(clickHandler)) {
+onClick = onClick + "; " + clickHandler;
+} else {
+onClick = clickHandler;
+}
+parameters.put("onclick", onClick);
+}
+
 /**
  * Override UIBean's implementation, such that component Html id is 
determined
  * in the following order :-



[3/3] git commit: Updates expected test results to meet new requirements for action: prefix

2014-03-13 Thread lukaszlenart
Updates expected test results to meet new requirements for action: prefix


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

Branch: refs/heads/feature/use-js-to-support-multiple-buttons
Commit: 83bdfcb57bc28139012e711a2f542acf90bfad4a
Parents: 706b289
Author: Lukasz Lenart 
Authored: Thu Mar 13 09:23:17 2014 +0100
Committer: Lukasz Lenart 
Committed: Thu Mar 13 09:23:17 2014 +0100

--
 .../org/apache/struts2/views/jsp/ui/Reset-1.txt |  2 +-
 .../org/apache/struts2/views/jsp/ui/Reset-2.txt |  2 +-
 .../org/apache/struts2/views/jsp/ui/Reset-3.txt |  2 +-
 .../org/apache/struts2/views/jsp/ui/Reset-4.txt |  2 +-
 .../org/apache/struts2/views/jsp/ui/Reset-5.txt |  2 +-
 .../org/apache/struts2/views/jsp/ui/Reset-6.txt |  2 +-
 .../org/apache/struts2/views/jsp/ui/Reset-7.txt | 11 ++-
 .../org/apache/struts2/views/jsp/ui/Reset-8.txt | 11 ++-
 .../org/apache/struts2/views/jsp/ui/Reset-9.txt |  2 +-
 .../org/apache/struts2/views/jsp/ui/Submit-7.txt| 10 +-
 .../org/apache/struts2/views/jsp/ui/Submit-8.txt| 12 ++--
 11 files changed, 46 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/83bdfcb5/core/src/test/resources/org/apache/struts2/views/jsp/ui/Reset-1.txt
--
diff --git 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Reset-1.txt 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Reset-1.txt
index c89899b..9a63734 100644
--- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Reset-1.txt
+++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Reset-1.txt
@@ -1,3 +1,3 @@
 
-
+
 

http://git-wip-us.apache.org/repos/asf/struts/blob/83bdfcb5/core/src/test/resources/org/apache/struts2/views/jsp/ui/Reset-2.txt
--
diff --git 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Reset-2.txt 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Reset-2.txt
index 279c143..d3f3af0 100644
--- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Reset-2.txt
+++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Reset-2.txt
@@ -1,3 +1,3 @@
 
-
+
 

http://git-wip-us.apache.org/repos/asf/struts/blob/83bdfcb5/core/src/test/resources/org/apache/struts2/views/jsp/ui/Reset-3.txt
--
diff --git 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Reset-3.txt 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Reset-3.txt
index 9497bb6..3152859 100644
--- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Reset-3.txt
+++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Reset-3.txt
@@ -1,3 +1,3 @@
 
-bar
+bar
 

http://git-wip-us.apache.org/repos/asf/struts/blob/83bdfcb5/core/src/test/resources/org/apache/struts2/views/jsp/ui/Reset-4.txt
--
diff --git 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Reset-4.txt 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Reset-4.txt
index 3fa4c37..e0e0589 100644
--- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Reset-4.txt
+++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Reset-4.txt
@@ -1,3 +1,3 @@
 
-mylabel
+mylabel
 

http://git-wip-us.apache.org/repos/asf/struts/blob/83bdfcb5/core/src/test/resources/org/apache/struts2/views/jsp/ui/Reset-5.txt
--
diff --git 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Reset-5.txt 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Reset-5.txt
index fbab3f6..67df7bd 100644
--- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Reset-5.txt
+++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Reset-5.txt
@@ -1,3 +1,3 @@
 
-bar
+bar
 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/struts/blob/83bdfcb5/core/src/test/resources/org/apache/struts2/views/jsp/ui/Reset-6.txt
--
diff --git 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Reset-6.txt 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Reset-6.txt
index 39a2906..14038a0 100644
--- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Reset-6.txt
+++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Reset-6.txt
@@ -1,3 +1,3 @@
 
-
+
 
\ No newline at end 

[2/3] git commit: Extends Submit and Reset to use new approach of multiple submit buttons

2014-03-13 Thread lukaszlenart
Extends Submit and Reset to use new approach of multiple submit buttons


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

Branch: refs/heads/feature/use-js-to-support-multiple-buttons
Commit: 706b289aaa1a64c8928e848b1b108f52a5981977
Parents: ca91136
Author: Lukasz Lenart 
Authored: Thu Mar 13 09:22:14 2014 +0100
Committer: Lukasz Lenart 
Committed: Thu Mar 13 09:22:14 2014 +0100

--
 .../template/simple/action-handler.ftl  | 30 
 .../main/resources/template/simple/reset.ftl|  9 +-
 .../resources/template/simple/submit-close.ftl  |  1 +
 3 files changed, 39 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/706b289a/core/src/main/resources/template/simple/action-handler.ftl
--
diff --git a/core/src/main/resources/template/simple/action-handler.ftl 
b/core/src/main/resources/template/simple/action-handler.ftl
new file mode 100644
index 000..34517f9
--- /dev/null
+++ b/core/src/main/resources/template/simple/action-handler.ftl
@@ -0,0 +1,30 @@
+<#--
+/*
+ * $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.
+ */
+-->
+<#if parameters.name?? && parameters.name?contains("action:")>
+
+  function submitAction_${parameters.id?html}(element) {
+element.form.action = '${parameters.name?substring("action:"?length)}';
+element.form.submit();
+  }
+
+
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/struts/blob/706b289a/core/src/main/resources/template/simple/reset.ftl
--
diff --git a/core/src/main/resources/template/simple/reset.ftl 
b/core/src/main/resources/template/simple/reset.ftl
index 0ddba57..635cee6 100644
--- a/core/src/main/resources/template/simple/reset.ftl
+++ b/core/src/main/resources/template/simple/reset.ftl
@@ -22,6 +22,9 @@
 -->
 <#if parameters.type?? && parameters.type=="button">
 
+<#if parameters.id??>
+ id="${parameters.id?html}"<#rt/>
+
 <#if parameters.name??>
  name="${parameters.name?html}"<#rt/>
 
@@ -51,6 +54,9 @@
 /><#else><#if parameters.label??><@s.property 
value="parameters.label"/><#rt/>
 <#else>
 
+<#if parameters.id??>
+ id="${parameters.id?html}"<#rt/>
+
 <#if parameters.name??>
  name="${parameters.name?html}"<#rt/>
 
@@ -73,4 +79,5 @@
 <#include 
"/${parameters.templateDir}/${parameters.expandTheme}/common-attributes.ftl" />
 <#include 
"/${parameters.templateDir}/${parameters.expandTheme}/dynamic-attributes.ftl" />
 />
-
\ No newline at end of file
+
+<#include 
"/${parameters.templateDir}/${parameters.expandTheme}/action-handler.ftl"/>

http://git-wip-us.apache.org/repos/asf/struts/blob/706b289a/core/src/main/resources/template/simple/submit-close.ftl
--
diff --git a/core/src/main/resources/template/simple/submit-close.ftl 
b/core/src/main/resources/template/simple/submit-close.ftl
index 7f51958..3c4138b 100644
--- a/core/src/main/resources/template/simple/submit-close.ftl
+++ b/core/src/main/resources/template/simple/submit-close.ftl
@@ -4,3 +4,4 @@
 <#else>
 ${parameters.body}<#rt/>
 
+<#include 
"/${parameters.templateDir}/${parameters.expandTheme}/action-handler.ftl"/>



svn commit: r1577187 - /struts/site/trunk/README

2014-03-13 Thread lukaszlenart
Author: lukaszlenart
Date: Thu Mar 13 15:09:03 2014
New Revision: 1577187

URL: http://svn.apache.org/r1577187
Log:
Update readme about Jekyll

Modified:
struts/site/trunk/README

Modified: struts/site/trunk/README
URL: 
http://svn.apache.org/viewvc/struts/site/trunk/README?rev=1577187&r1=1577186&r2=1577187&view=diff
==
--- struts/site/trunk/README (original)
+++ struts/site/trunk/README Thu Mar 13 15:09:03 2014
@@ -2,6 +2,9 @@ This project is used to update main Apac
 On each commit site is rebuild and available at 
http://struts.staging.apache.org/
 You must manually push changes to production via CMS.
 
-Site is generated by Maven and uses xdoc either markdown format.
+Site is generated by Jekyll and uses pure html either markdown format.
+To test website locally:
 
-There is also additional build_cms.sh script used right now only to update 
Draft docs available http://struts.apache.org/development/2.x/
+ > jekyll serve -w
+
+All pages are generated into 'content' folder.




svn commit: r1577194 - /struts/site/trunk/build_cms.sh

2014-03-13 Thread lukaszlenart
Author: lukaszlenart
Date: Thu Mar 13 15:22:58 2014
New Revision: 1577194

URL: http://svn.apache.org/r1577194
Log:
Set svn:executable property

Modified:
struts/site/trunk/build_cms.sh   (props changed)

Propchange: struts/site/trunk/build_cms.sh
--
svn:executable = *




git commit: Removes direct support for action: prefix

2014-03-13 Thread lukaszlenart
Repository: struts
Updated Branches:
  refs/heads/feature/use-js-to-support-multiple-buttons 83bdfcb57 -> 9ffd0417b


Removes direct support for action: prefix


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

Branch: refs/heads/feature/use-js-to-support-multiple-buttons
Commit: 9ffd0417b66030e456c6c3684ed95406b4af
Parents: 83bdfcb
Author: Lukasz Lenart 
Authored: Thu Mar 13 18:31:43 2014 +0100
Committer: Lukasz Lenart 
Committed: Thu Mar 13 18:31:43 2014 +0100

--
 .../org/apache/struts2/StrutsConstants.java |  6 ---
 .../dispatcher/mapper/DefaultActionMapper.java  | 42 --
 .../org/apache/struts2/default.properties   |  8 +---
 core/src/main/resources/struts-default.xml  |  8 ++--
 .../mapper/DefaultActionMapperTest.java | 45 
 .../convention/annotation/ResultPath.java   |  2 +-
 6 files changed, 24 insertions(+), 87 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/9ffd0417/core/src/main/java/org/apache/struts2/StrutsConstants.java
--
diff --git a/core/src/main/java/org/apache/struts2/StrutsConstants.java 
b/core/src/main/java/org/apache/struts2/StrutsConstants.java
index 3423ec8..b6ccc3c 100644
--- a/core/src/main/java/org/apache/struts2/StrutsConstants.java
+++ b/core/src/main/java/org/apache/struts2/StrutsConstants.java
@@ -271,12 +271,6 @@ public final class StrutsConstants {
 /** actions names' whitelist **/
 public static final String STRUTS_ALLOWED_ACTION_NAMES = 
"struts.allowed.action.names";
 
-/** enables action: prefix **/
-public static final String STRUTS_MAPPER_ACTION_PREFIX_ENABLED = 
"struts.mapper.action.prefix.enabled";
-
-/** enables access to actions in other namespaces than current with 
action: prefix **/
-public static final String STRUTS_MAPPER_ACTION_PREFIX_CROSSNAMESPACES = 
"struts.mapper.action.prefix.crossNamespaces";
-
 public static final String DEFAULT_TEMPLATE_TYPE_CONFIG_KEY = 
"struts.ui.templateSuffix";
 
 /** Allows override default DispatcherErrorHandler **/

http://git-wip-us.apache.org/repos/asf/struts/blob/9ffd0417/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java
--
diff --git 
a/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java
 
b/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java
index a7a1a69..b3390c1 100644
--- 
a/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java
+++ 
b/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java
@@ -113,15 +113,12 @@ public class DefaultActionMapper implements ActionMapper {
 private static final Logger LOG = 
LoggerFactory.getLogger(DefaultActionMapper.class);
 
 protected static final String METHOD_PREFIX = "method:";
-protected static final String ACTION_PREFIX = "action:";
 
 protected boolean allowDynamicMethodCalls = false;
 protected boolean allowSlashesInActionNames = false;
 protected boolean alwaysSelectFullNamespace = false;
 protected PrefixTrie prefixTrie = null;
 protected Pattern allowedActionNames = 
Pattern.compile("[a-zA-Z0-9._!/\\-]*");
-private boolean allowActionPrefix = false;
-private boolean allowActionCrossNamespaceAccess = false;
 
 protected List extensions = new ArrayList() {{
 add("action");
@@ -140,35 +137,6 @@ public class DefaultActionMapper implements ActionMapper {
 }
 }
 });
-
-put(ACTION_PREFIX, new ParameterAction() {
-public void execute(final String key, ActionMapping 
mapping) {
-if (allowActionPrefix) {
-String name = 
key.substring(ACTION_PREFIX.length());
-if (allowDynamicMethodCalls) {
-int bang = name.indexOf('!');
-if (bang != -1) {
-String method = name.substring(bang + 1);
-mapping.setMethod(method);
-name = name.substring(0, bang);
-}
-}
-String actionName = cleanupActionName(name);
-if (allowSlashesInActionNames && 
!allowActionCrossNamespaceAccess) {
-if (actionName.startsWith("/")) {
-   

[3/6] git commit: Adds usage of new urlRegex field in client side validation

2014-03-13 Thread lukaszlenart
Adds usage of new urlRegex field in client side validation


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

Branch: refs/heads/develop
Commit: 3f6ce657da3ac6c133939bfcebb4e4e5f6bd2bc1
Parents: 3457a65
Author: Lukasz Lenart 
Authored: Sun Mar 9 21:02:27 2014 +0100
Committer: Lukasz Lenart 
Committed: Sun Mar 9 21:02:27 2014 +0100

--
 core/src/main/resources/template/xhtml/form-close-validate.ftl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/3f6ce657/core/src/main/resources/template/xhtml/form-close-validate.ftl
--
diff --git a/core/src/main/resources/template/xhtml/form-close-validate.ftl 
b/core/src/main/resources/template/xhtml/form-close-validate.ftl
index 81a17e1..f129156 100644
--- a/core/src/main/resources/template/xhtml/form-close-validate.ftl
+++ b/core/src/main/resources/template/xhtml/form-close-validate.ftl
@@ -120,7 +120,7 @@ END SNIPPET: supported-validators
 <#if validator.shortCircuit>continueValidation = false;
 }
 <#elseif validator.validatorType = "url">
-if (continueValidation && fieldValue != null && fieldValue.length 
> 0 && fieldValue.match("${validator.regex?js_string}")==null) {
+if (continueValidation && fieldValue != null && fieldValue.length 
> 0 && fieldValue.match("/${validator.urlRegex?js_string}/i")==null) {
 addError(field, error);
 errors = true;
 <#if validator.shortCircuit>continueValidation = false;



[1/6] git commit: Extends validator to allow set predefined regex used to validate URLs

2014-03-13 Thread lukaszlenart
Repository: struts
Updated Branches:
  refs/heads/develop bcd61a0de -> aa744b811


Extends validator to allow set predefined regex used to validate URLs


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

Branch: refs/heads/develop
Commit: 31be88afa28fb9b1e9854d0d7673ab9b979cf9be
Parents: bcd61a0
Author: Lukasz Lenart 
Authored: Sun Mar 9 21:01:15 2014 +0100
Committer: Lukasz Lenart 
Committed: Sun Mar 9 21:01:15 2014 +0100

--
 .../validator/validators/URLValidator.java  | 46 ++
 .../xwork2/validator/URLValidatorTest.java  | 50 
 2 files changed, 96 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/31be88af/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/URLValidator.java
--
diff --git 
a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/URLValidator.java
 
b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/URLValidator.java
index b4a1287..4f63961 100644
--- 
a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/URLValidator.java
+++ 
b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/URLValidator.java
@@ -17,6 +17,7 @@ package com.opensymphony.xwork2.validator.validators;
 
 import com.opensymphony.xwork2.validator.ValidationException;
 import com.opensymphony.xwork2.util.URLUtil;
+import org.apache.commons.lang3.StringUtils;
 
 /**
  * 
@@ -31,6 +32,8 @@ import com.opensymphony.xwork2.util.URLUtil;
  * 
  * 
  * fieldName - The field name this validator is validating. 
Required if using Plain-Validator Syntax otherwise not required
+ * urlRegexExpression - The regex defined as expression used 
to validate url. If not defined 'urlRegex' will be used instead
+ * urlRegex - The regex used to validate url. If not defined 
default regex will be used
  * 
  * 
  * 
@@ -62,6 +65,9 @@ import com.opensymphony.xwork2.util.URLUtil;
  */
 public class URLValidator extends FieldValidatorSupport {
 
+private String urlRegex;
+private String urlRegexExpression;
+
 public void validate(Object object) throws ValidationException {
 String fieldName = getFieldName();
 Object value = this.getFieldValue(fieldName, object);
@@ -72,8 +78,48 @@ public class URLValidator extends FieldValidatorSupport {
 return;
 }
 
+// FIXME deprecated! the same regex below should be used instead
+// replace logic with next major release
 if (!(value.getClass().equals(String.class)) || 
!URLUtil.verifyUrl((String) value)) {
 addFieldError(fieldName, object);
 }
 }
+
+/**
+ * This is used to support client-side validation, it's based on
+ * 
http://stackoverflow.com/questions/161738/what-is-the-best-regular-expression-to-check-if-a-string-is-a-valid-url
+ *
+ * @return regex to validate URLs
+ */
+public String getUrlRegex() {
+if (StringUtils.isNotEmpty(urlRegexExpression)) {
+return (String) parse(urlRegexExpression, String.class);
+} else if (StringUtils.isNotEmpty(urlRegex)) {
+return urlRegex;
+} else {
+return "^(https?|ftp):\\/\\/" +
+"(([a-z0-9$_\\.\\+!\\*\\'\\(\\),;\\?&=-]|%[0-9a-f]{2})+" +
+
"(:([a-z0-9$_\\.\\+!\\*\\'\\(\\),;\\?&=-]|%[0-9a-f]{2})+)?" +
+"@)?(#?" +
+")((([a-z0-9]\\.|[a-z0-9][a-z0-9-]*[a-z0-9]\\.)*" +
+"[a-z][a-z0-9-]*[a-z0-9]" +
+"|((\\d|[1-9]\\d|1\\d{2}|2[0-4][0-9]|25[0-5])\\.){3}" +
+"(\\d|[1-9]\\d|1\\d{2}|2[0-4][0-9]|25[0-5])" +
+")(:\\d+)?" +
+
")(((\\/+([a-z0-9$_\\.\\+!\\*\\'\\(\\),;:@&=-]|%[0-9a-f]{2})*)*" +
+
"(\\?([a-z0-9$_\\.\\+!\\*\\'\\(\\),;:@&=-]|%[0-9a-f]{2})*)" +
+"?)?)?" +
+"(#([a-z0-9$_\\.\\+!\\*\\'\\(\\),;:@&=-]|%[0-9a-f]{2})*)?" 
+
+"$";
+}
+}
+
+public void setUrlRegex(String urlRegex) {
+this.urlRegex = urlRegex;
+}
+
+public void setUrlRegexExpression(String urlRegexExpression) {
+this.urlRegexExpression = urlRegexExpression;
+}
+
 }

http://git-wip-us.apache.org/repos/asf/struts/blob/31be88af/xwork-core/src/test/java/com/opensymphony/xwork2/validator/URLValidatorTest.java
--
diff --git 
a/xwork-core/src/test/java/com/opensymphony/xwork2/validato

[2/6] git commit: Marks method as deprecated

2014-03-13 Thread lukaszlenart
Marks method as deprecated


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

Branch: refs/heads/develop
Commit: 3457a656ba95539145ef3b19d254fe0129b4d187
Parents: 31be88a
Author: Lukasz Lenart 
Authored: Sun Mar 9 21:01:44 2014 +0100
Committer: Lukasz Lenart 
Committed: Sun Mar 9 21:01:44 2014 +0100

--
 xwork-core/src/main/java/com/opensymphony/xwork2/util/URLUtil.java | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/3457a656/xwork-core/src/main/java/com/opensymphony/xwork2/util/URLUtil.java
--
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/util/URLUtil.java 
b/xwork-core/src/main/java/com/opensymphony/xwork2/util/URLUtil.java
index b9aaee7..160a5b9 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/util/URLUtil.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/util/URLUtil.java
@@ -33,6 +33,7 @@ public class URLUtil {
  * @param url The url string to verify.
  * @return a boolean indicating whether the URL seems to be incorrect.
  */
+@Deprecated
 public static boolean verifyUrl(String url) {
 if (LOG.isDebugEnabled()) {
 LOG.debug("Checking if url [#0] is valid", url);



[6/6] git commit: WW-4198 Merges changes to develop

2014-03-13 Thread lukaszlenart
WW-4198 Merges changes to develop


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

Branch: refs/heads/develop
Commit: aa744b811f9c41b80cc30ad6cf41ccaa75da5323
Parents: bcd61a0 e585490
Author: Lukasz Lenart 
Authored: Thu Mar 13 18:39:15 2014 +0100
Committer: Lukasz Lenart 
Committed: Thu Mar 13 18:39:15 2014 +0100

--
 .../template/xhtml/form-close-validate.ftl  |  2 +-
 .../com/opensymphony/xwork2/util/URLUtil.java   |  1 +
 ...nnotationValidationConfigurationBuilder.java |  6 ++
 .../validator/annotations/UrlValidator.java | 76 +++-
 .../validator/validators/URLValidator.java  | 66 +++--
 .../xwork2/validator/URLValidatorTest.java  | 50 +
 6 files changed, 112 insertions(+), 89 deletions(-)
--




[4/6] git commit: Extends annotation to support new URL regex parameters

2014-03-13 Thread lukaszlenart
Extends annotation to support new URL regex parameters


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

Branch: refs/heads/develop
Commit: e66a3062992fac588cf3f570a224bbe7d9ce5ef5
Parents: 3f6ce65
Author: Lukasz Lenart 
Authored: Sun Mar 9 21:04:11 2014 +0100
Committer: Lukasz Lenart 
Committed: Sun Mar 9 21:04:11 2014 +0100

--
 ...nnotationValidationConfigurationBuilder.java |  6 ++
 .../validator/annotations/UrlValidator.java | 74 +++-
 2 files changed, 16 insertions(+), 64 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/e66a3062/xwork-core/src/main/java/com/opensymphony/xwork2/validator/AnnotationValidationConfigurationBuilder.java
--
diff --git 
a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/AnnotationValidationConfigurationBuilder.java
 
b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/AnnotationValidationConfigurationBuilder.java
index 6ab06a9..dbd8975 100644
--- 
a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/AnnotationValidationConfigurationBuilder.java
+++ 
b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/AnnotationValidationConfigurationBuilder.java
@@ -528,6 +528,12 @@ public class AnnotationValidationConfigurationBuilder {
 } else if (v.fieldName() != null && v.fieldName().length() > 0) {
 params.put("fieldName", v.fieldName());
 }
+if (StringUtils.isNotEmpty(v.urlRegex())) {
+params.put("urlRegex", v.urlRegex());
+}
+if (StringUtils.isNotEmpty(v.urlRegexExpression())) {
+params.put("urlRegexExpression", v.urlRegexExpression());
+}
 
 validatorFactory.lookupRegisteredValidatorType(validatorType);
 return new ValidatorConfig.Builder(validatorType)

http://git-wip-us.apache.org/repos/asf/struts/blob/e66a3062/xwork-core/src/main/java/com/opensymphony/xwork2/validator/annotations/UrlValidator.java
--
diff --git 
a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/annotations/UrlValidator.java
 
b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/annotations/UrlValidator.java
index fb6fa3c..a06db12 100644
--- 
a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/annotations/UrlValidator.java
+++ 
b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/annotations/UrlValidator.java
@@ -22,75 +22,12 @@ import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
 /**
- * 
  * This validator checks that a field is a valid URL.
- * 
- *
- *  Annotation usage:
- *
- * 
- * The annotation must be applied at method level.
- * 
- *
- *  Annotation parameters:
- *
- * 
- * 
- * 
- *  Parameter 
- *  Required 
- *  Default 
- *  Notes 
- * 
- * 
- * message
- * yes
- *  
- * field error message
- * 
- * 
- * key
- * no
- *  
- * i18n key from language specific properties 
file.
- * 
- * 
- * messageParams
- * no
- *  
- * Additional params to be used to customize message 
- will be evaluated against the Value Stack
- * 
- * 
- * fieldName
- * no
- *  
- *  
- * 
- * 
- * shortCircuit
- * no
- * false
- * If this validator should be used as 
shortCircuit.
- * 
- * 
- * type
- * yes
- * ValidatorType.FIELD
- * Enum value from ValidatorType. Either FIELD or 
SIMPLE can be used here.
- * 
- * 
- * 
- *
- *  Example code:
  *
  * 
- * 
  * @UrlValidator(message = "Default message", key = "i18n.key", 
shortCircuit = true)
- * 
  * 
  *
- * @author Rainer Hermanns
- * @version $Id$
  */
 @Target({ElementType.METHOD})
 @Retention(RetentionPolicy.RUNTIME)
@@ -121,7 +58,6 @@ public @interface UrlValidator {
  * If this is activated, the validator will be used as short-circuit.
  *
  * Adds the short-circuit="true" attribute value if true.
- *
  */
 boolean shortCircuit() default false;
 
@@ -130,4 +66,14 @@ public @interface UrlValidator {
  */
 ValidatorType type() default ValidatorType.FIELD;
 
+/**
+ * Defines regex to use to validate url
+ */
+String urlRegex() default "";
+
+/**
+ * Defines regex as an expression which will be evaluated to string and 
used to validate url
+ */
+String urlRegexExpression() default "";
+
 }



[5/6] git commit: Moves snippets to wiki

2014-03-13 Thread lukaszlenart
Moves snippets to wiki


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

Branch: refs/heads/develop
Commit: e585490656225f88dc28300b722ec38dcffbb6ba
Parents: e66a306
Author: Lukasz Lenart 
Authored: Sun Mar 9 21:22:28 2014 +0100
Committer: Lukasz Lenart 
Committed: Sun Mar 9 21:22:28 2014 +0100

--
 .../validator/annotations/UrlValidator.java |  2 --
 .../validator/validators/URLValidator.java  | 24 
 2 files changed, 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/e5854906/xwork-core/src/main/java/com/opensymphony/xwork2/validator/annotations/UrlValidator.java
--
diff --git 
a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/annotations/UrlValidator.java
 
b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/annotations/UrlValidator.java
index a06db12..9ad9223 100644
--- 
a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/annotations/UrlValidator.java
+++ 
b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/annotations/UrlValidator.java
@@ -13,7 +13,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package com.opensymphony.xwork2.validator.annotations;
 
 import java.lang.annotation.ElementType;
@@ -27,7 +26,6 @@ import java.lang.annotation.Target;
  * 
  * @UrlValidator(message = "Default message", key = "i18n.key", 
shortCircuit = true)
  * 
- *
  */
 @Target({ElementType.METHOD})
 @Retention(RetentionPolicy.RUNTIME)

http://git-wip-us.apache.org/repos/asf/struts/blob/e5854906/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/URLValidator.java
--
diff --git 
a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/URLValidator.java
 
b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/URLValidator.java
index 4f63961..767416d 100644
--- 
a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/URLValidator.java
+++ 
b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/URLValidator.java
@@ -20,28 +20,9 @@ import com.opensymphony.xwork2.util.URLUtil;
 import org.apache.commons.lang3.StringUtils;
 
 /**
- * 
- * 
  * URLValidator checks that a given field is a String and a valid URL
- * 
- * 
- * 
- * 
- * 
- * 
- * 
- * 
- * fieldName - The field name this validator is validating. 
Required if using Plain-Validator Syntax otherwise not required
- * urlRegexExpression - The regex defined as expression used 
to validate url. If not defined 'urlRegex' will be used instead
- * urlRegex - The regex used to validate url. If not defined 
default regex will be used
- * 
- * 
- * 
- *
- * 
  *
  * 
- * 
  * 
  *  
  *  
@@ -56,12 +37,7 @@ import org.apache.commons.lang3.StringUtils;
  *  
  *  
  * 
- * 
  * 
- *
- *
- * @author $Author$
- * @version $Date$ $Revision$
  */
 public class URLValidator extends FieldValidatorSupport {
 



Git Push Summary

2014-03-13 Thread lukaszlenart
Repository: struts
Updated Branches:
  refs/heads/feature/WW-4248-add-notes-about-i18n [deleted] dfaaba7b2


Git Push Summary

2014-03-13 Thread lukaszlenart
Repository: struts
Updated Branches:
  refs/heads/feature/WW-4198-update-form-close [deleted] e58549065


git commit: Comments out defaults which are already defined in Java classes

2014-03-13 Thread lukaszlenart
Repository: struts
Updated Branches:
  refs/heads/feature/WW-4267-removes-defaults [created] f2b52612b


Comments out defaults which are already defined in Java classes


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

Branch: refs/heads/feature/WW-4267-removes-defaults
Commit: f2b52612b8d3cf3cd6a01cc8246769c5ec4fc789
Parents: aa744b8
Author: Lukasz Lenart 
Authored: Thu Mar 13 19:16:13 2014 +0100
Committer: Lukasz Lenart 
Committed: Thu Mar 13 19:16:13 2014 +0100

--
 core/src/main/resources/org/apache/struts2/default.properties | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/f2b52612/core/src/main/resources/org/apache/struts2/default.properties
--
diff --git a/core/src/main/resources/org/apache/struts2/default.properties 
b/core/src/main/resources/org/apache/struts2/default.properties
index ea3bc0c..5d49802 100644
--- a/core/src/main/resources/org/apache/struts2/default.properties
+++ b/core/src/main/resources/org/apache/struts2/default.properties
@@ -135,7 +135,7 @@ struts.devMode = false
 
 ### when set to true, resource bundles will be reloaded on _every_ request.
 ### this is good during development, but should never be used in production
-struts.i18n.reload=false
+### struts.i18n.reload=false
 
 ### Standard UI theme
 ### Change this to reflect which path should be used for JSP control tag 
templates by default
@@ -148,7 +148,7 @@ struts.ui.templateSuffix=ftl
 
 ### Configuration reloading
 ### This will cause the configuration to reload struts.xml when it is changed
-struts.configuration.xml.reload=false
+### struts.configuration.xml.reload=false
 
 ### Location of velocity.properties file.  defaults to velocity.properties
 struts.velocity.configfile = velocity.properties
@@ -179,7 +179,7 @@ struts.dispatcher.parametersWorkaround = false
 
 ### Enables caching of FreeMarker templates
 ### Has the same effect as copying the templates under WEB_APP/templates
-struts.freemarker.templatesCache=false
+### struts.freemarker.templatesCache=false
 
 ### Enables caching of models on the BeanWrapper
 struts.freemarker.beanwrapperCache=false



[4/4] git commit: WW-4297 finishes feature: improves hidden tag to properly support xhtml theme

2014-03-13 Thread lukaszlenart
WW-4297 finishes feature: improves hidden tag to properly support xhtml theme


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

Branch: refs/heads/develop
Commit: d63deb9750a3d409be30414faaf76f5481a4417d
Parents: aa744b8 924531c
Author: Lukasz Lenart 
Authored: Thu Mar 13 20:21:50 2014 +0100
Committer: Lukasz Lenart 
Committed: Thu Mar 13 20:21:50 2014 +0100

--
 .../org/apache/struts2/components/Hidden.java   |  7 ++
 .../main/resources/template/xhtml/hidden.ftl| 25 
 .../apache/struts2/StrutsInternalTestCase.java  |  9 ---
 .../struts2/views/jsp/AbstractTagTest.java  |  4 +---
 .../apache/struts2/views/jsp/ui/Hidden-1.txt|  8 ++-
 .../apache/struts2/views/jsp/ui/Hidden-2.txt|  8 ++-
 6 files changed, 51 insertions(+), 10 deletions(-)
--




[3/4] git commit: Improves tests to reuse the same ServletContext

2014-03-13 Thread lukaszlenart
Improves tests to reuse the same ServletContext


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

Branch: refs/heads/develop
Commit: 924531c54400882d1781ba3067d7af63825850c3
Parents: 43e86d7
Author: Lukasz Lenart 
Authored: Thu Mar 13 20:20:25 2014 +0100
Committer: Lukasz Lenart 
Committed: Thu Mar 13 20:20:25 2014 +0100

--
 .../java/org/apache/struts2/StrutsInternalTestCase.java | 9 -
 .../java/org/apache/struts2/views/jsp/AbstractTagTest.java  | 4 +---
 2 files changed, 5 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/924531c5/core/src/test/java/org/apache/struts2/StrutsInternalTestCase.java
--
diff --git a/core/src/test/java/org/apache/struts2/StrutsInternalTestCase.java 
b/core/src/test/java/org/apache/struts2/StrutsInternalTestCase.java
index 0b9d1c4..6816481 100644
--- a/core/src/test/java/org/apache/struts2/StrutsInternalTestCase.java
+++ b/core/src/test/java/org/apache/struts2/StrutsInternalTestCase.java
@@ -21,15 +21,12 @@
 
 package org.apache.struts2;
 
-import com.opensymphony.xwork2.ActionProxyFactory;
 import com.opensymphony.xwork2.XWorkTestCase;
-import com.opensymphony.xwork2.config.ConfigurationProvider;
-import com.opensymphony.xwork2.util.XWorkTestCaseHelper;
 import com.opensymphony.xwork2.util.logging.LoggerFactory;
 import com.opensymphony.xwork2.util.logging.jdk.JdkLoggerFactory;
 import org.apache.struts2.dispatcher.Dispatcher;
 import org.apache.struts2.util.StrutsTestCaseHelper;
-import org.springframework.mock.web.MockServletContext;
+import org.apache.struts2.views.jsp.StrutsMockServletContext;
 
 import java.text.SimpleDateFormat;
 import java.util.Date;
@@ -75,6 +72,7 @@ public abstract class StrutsInternalTestCase extends 
XWorkTestCase {
 LoggerFactory.setLoggerFactory(new JdkLoggerFactory());
 }
 
+protected StrutsMockServletContext servletContext;
 protected Dispatcher dispatcher;
 
 /**
@@ -87,7 +85,8 @@ public abstract class StrutsInternalTestCase extends 
XWorkTestCase {
 }
 
 protected Dispatcher initDispatcher(Map params) {
-dispatcher = StrutsTestCaseHelper.initDispatcher(new 
MockServletContext(), params);
+servletContext = new StrutsMockServletContext();
+dispatcher = StrutsTestCaseHelper.initDispatcher(servletContext, 
params);
 configurationManager = dispatcher.getConfigurationManager();
 configuration = configurationManager.getConfiguration();
 container = configuration.getContainer();

http://git-wip-us.apache.org/repos/asf/struts/blob/924531c5/core/src/test/java/org/apache/struts2/views/jsp/AbstractTagTest.java
--
diff --git 
a/core/src/test/java/org/apache/struts2/views/jsp/AbstractTagTest.java 
b/core/src/test/java/org/apache/struts2/views/jsp/AbstractTagTest.java
index 36b04fa..60eb170 100644
--- a/core/src/test/java/org/apache/struts2/views/jsp/AbstractTagTest.java
+++ b/core/src/test/java/org/apache/struts2/views/jsp/AbstractTagTest.java
@@ -61,7 +61,6 @@ public abstract class AbstractTagTest extends 
StrutsInternalTestCase {
 protected StrutsMockHttpServletRequest request;
 protected StrutsMockPageContext pageContext;
 protected HttpServletResponse response;
-protected StrutsMockServletContext servletContext;
 
 protected Mock mockContainer;
 
@@ -83,7 +82,7 @@ public abstract class AbstractTagTest extends 
StrutsInternalTestCase {
 createMocks();
 }
 
-protected void createMocks() {
+protected void createMocks() throws Exception {
 action = this.getAction();
 stack = ActionContext.getContext().getValueStack();
 context = stack.getContext();
@@ -99,7 +98,6 @@ public abstract class AbstractTagTest extends 
StrutsInternalTestCase {
 
 JspWriter jspWriter = new StrutsMockJspWriter(writer);
 
-servletContext = new StrutsMockServletContext();
 servletContext.setRealPath(new 
File("nosuchfile.properties").getAbsolutePath());
 servletContext.setServletInfo("Resin");
 



[1/4] git commit: Extends Hidden to support xhtml theme properly

2014-03-13 Thread lukaszlenart
Repository: struts
Updated Branches:
  refs/heads/develop aa744b811 -> d63deb975


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/develop
Commit: cdf3c5cbf120d984049bb6d292193d8620d52639
Parents: aa744b8
Author: Lukasz Lenart 
Authored: Thu Mar 13 20:17:01 2014 +0100
Committer: Lukasz Lenart 
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 000..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" />



[2/4] git commit: Extends Hidden tests results to match new xhtml theme

2014-03-13 Thread lukaszlenart
Extends Hidden tests results to match new xhtml theme


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

Branch: refs/heads/develop
Commit: 43e86d76d5dc6bc7b6261e91eaddcee2cc009a6b
Parents: cdf3c5c
Author: Lukasz Lenart 
Authored: Thu Mar 13 20:19:59 2014 +0100
Committer: Lukasz Lenart 
Committed: Thu Mar 13 20:19:59 2014 +0100

--
 .../resources/org/apache/struts2/views/jsp/ui/Hidden-1.txt   | 8 +++-
 .../resources/org/apache/struts2/views/jsp/ui/Hidden-2.txt   | 8 +++-
 2 files changed, 14 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/43e86d76/core/src/test/resources/org/apache/struts2/views/jsp/ui/Hidden-1.txt
--
diff --git 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Hidden-1.txt 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Hidden-1.txt
index 4d6c927..fafc7ba 100644
--- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Hidden-1.txt
+++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Hidden-1.txt
@@ -1 +1,7 @@
-
+
+  
+  
+  
+
+  
+

http://git-wip-us.apache.org/repos/asf/struts/blob/43e86d76/core/src/test/resources/org/apache/struts2/views/jsp/ui/Hidden-2.txt
--
diff --git 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Hidden-2.txt 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Hidden-2.txt
index 2cc5ab6..df7e11b 100644
--- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Hidden-2.txt
+++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Hidden-2.txt
@@ -1 +1,7 @@
-
+
+  
+  
+  
+
+  
+



git commit: Uses simplest approach to inline s:hidden tag to xhtml theme

2014-03-13 Thread lukaszlenart
Repository: struts
Updated Branches:
  refs/heads/develop d63deb975 -> 3ceb3b973


Uses simplest approach to inline s:hidden tag to xhtml theme


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

Branch: refs/heads/develop
Commit: 3ceb3b973ea53a5e0f8f2c3b772eb50daee6aec0
Parents: d63deb9
Author: Lukasz Lenart 
Authored: Thu Mar 13 21:49:54 2014 +0100
Committer: Lukasz Lenart 
Committed: Thu Mar 13 21:49:54 2014 +0100

--
 core/src/main/resources/template/xhtml/hidden.ftl| 8 +---
 .../resources/org/apache/struts2/views/jsp/ui/Hidden-1.txt   | 6 ++
 .../resources/org/apache/struts2/views/jsp/ui/Hidden-2.txt   | 6 ++
 3 files changed, 9 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/3ceb3b97/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
index 3ff0f05..92881ab 100644
--- a/core/src/main/resources/template/xhtml/hidden.ftl
+++ b/core/src/main/resources/template/xhtml/hidden.ftl
@@ -20,6 +20,8 @@
  * under the License.
  */
 -->
-<#include 
"/${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl" />
-<#include "/${parameters.templateDir}/simple/hidden.ftl" />
-<#include 
"/${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl" />
+
+  
+<#include "/${parameters.templateDir}/simple/hidden.ftl" />
+  
+

http://git-wip-us.apache.org/repos/asf/struts/blob/3ceb3b97/core/src/test/resources/org/apache/struts2/views/jsp/ui/Hidden-1.txt
--
diff --git 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Hidden-1.txt 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Hidden-1.txt
index fafc7ba..875ee46 100644
--- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Hidden-1.txt
+++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Hidden-1.txt
@@ -1,7 +1,5 @@
-
-  
-  
-  
+
+  
 
   
 

http://git-wip-us.apache.org/repos/asf/struts/blob/3ceb3b97/core/src/test/resources/org/apache/struts2/views/jsp/ui/Hidden-2.txt
--
diff --git 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Hidden-2.txt 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Hidden-2.txt
index df7e11b..a5376ff 100644
--- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Hidden-2.txt
+++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Hidden-2.txt
@@ -1,7 +1,5 @@
-
-  
-  
-  
+
+  
 
   
 



[CONF] Confluence Changes in the last 24 hours

2014-03-13 Thread Anonymous (Confluence)
















  Confluence Changes in the last 24 hours  




 Apache ActiveMQ 

Pages

 Page: Stomp edited by Gary Tully [03:12 PM] (View Changes) 


 Apache Avro 

Pages

 Page: FAQ edited by Sean Busbey [07:06 PM] (View Changes) 


 Apache Camel 

Pages

 Page: Error handling in Camel edited by Gregor Zurowski [04:18 PM] (View Changes) 
 Page: How to use a dynamic URI in to() edited by Raúl Kripalani [01:46 PM] (View Changes) 
 Page: SQL Component edited by Raúl Kripalani [11:56 AM] (View Changes) 
 Page: HDFS2 created by Claus Ibsen [09:23 AM] 
 Page: Camel Maven Plugin edited by Carsten Ringe [10:48 AM] (View Changes) 
 Page: Camel 2.13.0 Release edited by Claus Ibsen [09:25 AM] (View Changes) 
 Page: Component List edited by Claus Ibsen [09:19 AM] (View Changes) 


 Apache Cayenne 

Pages

 Page: Board Report March 2014 created by Michael Gentry [01:34 PM] 
 Page: Board Reports edited by Michael Gentry [01:36 PM] (View Changes) 


 Apache Cloudstack 

Pages

 Page: CloudStack Identity and Access Management (IAM) Plugin edited by Prachi Damle [11:55 PM] (View Changes) 
 Page: CloudStack 4.4 Release (Draft) created by sudha [05:15 PM] 
 Page: PVLAN support for CloudStack deployment over Nexus 1000v in VMware environment edited by Sateesh Chodapuneedi [09:13 AM] (View Changes) 
 Page: Release test procedure edited by Animesh [02:33 AM] (View Changes) 


 CouchDB 

Pages

 Page: Debian created by Dave Cottlehuber [09:03 AM] 


 Apache Felix 

Pages

 Page: Board Report (2014-06) created by Felix Meschberger [10:37 AM] 
 Page: Board Report (2014-03) edited b