[10/17] git commit: Removes optional valueKey to keep backward compatibility

2014-07-30 Thread lukaszlenart
Removes optional valueKey to keep backward compatibility


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

Branch: refs/heads/develop
Commit: a2791a8305666859d6484098fb597f93c94908bc
Parents: 13269fa
Author: Lukasz Lenart 
Authored: Fri Jun 27 12:55:13 2014 +0200
Committer: Lukasz Lenart 
Committed: Fri Jun 27 12:55:13 2014 +0200

--
 core/src/main/java/org/apache/struts2/components/ListUIBean.java | 2 --
 1 file changed, 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/a2791a83/core/src/main/java/org/apache/struts2/components/ListUIBean.java
--
diff --git a/core/src/main/java/org/apache/struts2/components/ListUIBean.java 
b/core/src/main/java/org/apache/struts2/components/ListUIBean.java
index c9f704a..1adfc2e 100644
--- a/core/src/main/java/org/apache/struts2/components/ListUIBean.java
+++ b/core/src/main/java/org/apache/struts2/components/ListUIBean.java
@@ -113,8 +113,6 @@ public abstract class ListUIBean extends UIBean {
 if (listValueKey != null) {
 listValueKey = stripExpressionIfAltSyntax(listValueKey);
 addParameter("listValueKey", listValueKey);
-} else if (value instanceof Map) {
-addParameter("listValueKey", "valueKey");
 }
 
 if (listValue != null) {



[15/17] git commit: Extends test case to demonstrate possible usage of listValueKey

2014-07-30 Thread lukaszlenart
Extends test case to demonstrate possible usage of listValueKey


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

Branch: refs/heads/feature/WW-4295-localization
Commit: 8e6f198d41c01aa4b34645f558b209190f72510b
Parents: d20c2f1
Author: Lukasz Lenart 
Authored: Wed Jul 30 09:08:34 2014 +0200
Committer: Lukasz Lenart 
Committed: Wed Jul 30 09:08:34 2014 +0200

--
 .../views/jsp/ui/LocaleKeyValueTest.java| 11 ++
 .../struts2/views/jsp/ui/LocaleTestAction.java  | 17 
 .../struts2/views/jsp/ui/OptGroupTest.java  | 21 
 .../apache/struts2/views/jsp/ui/OptGroup-6.txt  |  8 
 4 files changed, 40 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/8e6f198d/core/src/test/java/org/apache/struts2/views/jsp/ui/LocaleKeyValueTest.java
--
diff --git 
a/core/src/test/java/org/apache/struts2/views/jsp/ui/LocaleKeyValueTest.java 
b/core/src/test/java/org/apache/struts2/views/jsp/ui/LocaleKeyValueTest.java
new file mode 100644
index 000..5ea01a7
--- /dev/null
+++ b/core/src/test/java/org/apache/struts2/views/jsp/ui/LocaleKeyValueTest.java
@@ -0,0 +1,11 @@
+package org.apache.struts2.views.jsp.ui;
+
+public enum LocaleKeyValueTest {
+
+ONE, TWO, THREE;
+
+public String getValueKey() {
+return getClass().getSimpleName() + "." + name();
+}
+
+}

http://git-wip-us.apache.org/repos/asf/struts/blob/8e6f198d/core/src/test/java/org/apache/struts2/views/jsp/ui/LocaleTestAction.java
--
diff --git 
a/core/src/test/java/org/apache/struts2/views/jsp/ui/LocaleTestAction.java 
b/core/src/test/java/org/apache/struts2/views/jsp/ui/LocaleTestAction.java
new file mode 100644
index 000..ad2a4b5
--- /dev/null
+++ b/core/src/test/java/org/apache/struts2/views/jsp/ui/LocaleTestAction.java
@@ -0,0 +1,17 @@
+package org.apache.struts2.views.jsp.ui;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.apache.struts2.TestAction;
+
+import com.opensymphony.xwork2.Action;
+
+public class LocaleTestAction extends TestAction implements Action {
+
+@SuppressWarnings("unused")
+public List getSelectValues() {
+return Arrays.asList(LocaleKeyValueTest.values());
+}
+
+}

http://git-wip-us.apache.org/repos/asf/struts/blob/8e6f198d/core/src/test/java/org/apache/struts2/views/jsp/ui/OptGroupTest.java
--
diff --git 
a/core/src/test/java/org/apache/struts2/views/jsp/ui/OptGroupTest.java 
b/core/src/test/java/org/apache/struts2/views/jsp/ui/OptGroupTest.java
index 038cb6a..de9d34b 100644
--- a/core/src/test/java/org/apache/struts2/views/jsp/ui/OptGroupTest.java
+++ b/core/src/test/java/org/apache/struts2/views/jsp/ui/OptGroupTest.java
@@ -23,13 +23,9 @@ package org.apache.struts2.views.jsp.ui;
 
 import java.util.LinkedHashMap;
 
-import com.opensymphony.xwork2.Action;
 import org.apache.struts2.TestAction;
 import org.apache.struts2.views.jsp.AbstractUITagTest;
 
-/**
- *
- */
 public class OptGroupTest extends AbstractUITagTest {
 
 public void testOptGroupSimple() throws Exception {
@@ -129,7 +125,7 @@ public class OptGroupTest extends AbstractUITagTest {

((TestAction)action).setMap(new LinkedHashMap() {{
put("AAA", "aaa");
-   put(new Long(11), "bbb");
+   put(11L, "bbb");
put("CCC", "ccc");
}});

@@ -192,20 +188,19 @@ public class OptGroupTest extends AbstractUITagTest {
 verify(SelectTag.class.getResource("OptGroup-5.txt"));
 }
 
+
 public void testOptGroupWithValueKey() throws Exception {
 SelectTag selectTag = new SelectTag();
 selectTag.setName("mySelection");
 selectTag.setLabel("My Selection");
-selectTag.setList("%{#{'ONE':'one','TWO':'two','THREE':'three'}}");
+selectTag.setList("selectValues");
 selectTag.setListValueKey("valueKey");
 
-stack.push(new Action() {
-public String execute() throws Exception {
-return SUCCESS;
-}
-
-public String getValueKey() { return "MyValue"; }
-});
+LocaleTestAction localeTestAction = new LocaleTestAction();
+
+localeTestAction.setText("LocaleKeyValueTest.ONE","Edno");
+localeTestAction.setText("LocaleKeyValueTest.TWO","Dve");
+stack.push(localeTestAction);
 
 OptGroupTag optGroupTag1 = new OptGroupTag();
 optGroupTag1.setLabel("

[06/17] git commit: updating ListUIBean

2014-07-30 Thread lukaszlenart
updating ListUIBean

updating java-backed bean


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

Branch: refs/heads/develop
Commit: 6def514524e81c4af188b47b6694384eea3a46c6
Parents: 7f586d3
Author: adam brin 
Authored: Mon Mar 24 07:31:54 2014 -0700
Committer: adam brin 
Committed: Mon Mar 24 07:31:54 2014 -0700

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


http://git-wip-us.apache.org/repos/asf/struts/blob/6def5145/core/src/main/java/org/apache/struts2/components/ListUIBean.java
--
diff --git a/core/src/main/java/org/apache/struts2/components/ListUIBean.java 
b/core/src/main/java/org/apache/struts2/components/ListUIBean.java
index b1a4493..69deae4 100644
--- a/core/src/main/java/org/apache/struts2/components/ListUIBean.java
+++ b/core/src/main/java/org/apache/struts2/components/ListUIBean.java
@@ -48,6 +48,7 @@ import java.util.Map;
 public abstract class ListUIBean extends UIBean {
 protected Object list;
 protected String listKey;
+protected String listValueKey;
 protected String listValue;
 protected String listCssClass;
 protected String listCssStyle;
@@ -108,6 +109,13 @@ public abstract class ListUIBean extends UIBean {
 addParameter("listKey", "key");
 }
 
+if (listValueKey != null) {
+listValueKey = stripExpressionIfAltSyntax(listValueKey);
+addParameter("listValueKey", listValueKey);
+} else if (value instanceof Map) {
+addParameter("listValueKey", "valueKey");
+}
+
 if (listValue != null) {
 listValue = stripExpressionIfAltSyntax(listValue);
 addParameter("listValue", listValue);
@@ -147,6 +155,11 @@ public abstract class ListUIBean extends UIBean {
 this.listKey = listKey;
 }
 
+@StrutsTagAttribute(description = " Property of list objects to get field 
value label from")
+public void setListValueKey(String listValueKey) {
+this.listValueKey = listValueKey;
+}
+
 @StrutsTagAttribute(description = "Property of list objects to get field 
content from")
 public void setListValue(String listValue) {
 this.listValue = listValue;



[16/17] git commit: WW-4295 finishes work

2014-07-30 Thread lukaszlenart
WW-4295 finishes work

Conflicts:
core/src/main/resources/template/simple/checkboxlist.ftl
core/src/site/resources/tags/checkboxlist.html


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

Branch: refs/heads/develop
Commit: 3b25242c7d98d6564d81ec39f0df54bc02181f71
Parents: 935cd33 8e6f198
Author: Lukasz Lenart 
Authored: Wed Jul 30 09:10:59 2014 +0200
Committer: Lukasz Lenart 
Committed: Wed Jul 30 09:10:59 2014 +0200

--
 .../blank/src/main/java/example/HelloWorld.java |  7 
 apps/blank/src/main/java/example/YesNo.java |  5 +++
 .../main/resources/example/package.properties   |  2 +
 .../webapp/WEB-INF/jsp/example/HelloWorld.jsp   |  2 +
 .../apache/struts2/components/ListUIBean.java   | 22 ++
 .../struts2/views/jsp/ui/AbstractListTag.java   | 12 ++
 .../resources/template/simple/checkboxlist.ftl  | 10 +++--
 .../main/resources/template/simple/radiomap.ftl |  8 +++-
 .../main/resources/template/simple/select.ftl   | 13 +-
 core/src/site/resources/tags/checkboxlist.html  | 16 +++
 core/src/site/resources/tags/doubleselect.html  | 16 +++
 .../resources/tags/inputtransferselect.html | 16 +++
 .../resources/tags/optiontransferselect.html| 16 +++
 core/src/site/resources/tags/radio.html | 16 +++
 core/src/site/resources/tags/select.html| 16 +++
 core/src/site/resources/tags/updownselect.html  | 16 +++
 .../views/jsp/ui/LocaleKeyValueTest.java| 11 +
 .../struts2/views/jsp/ui/LocaleTestAction.java  | 17 
 .../struts2/views/jsp/ui/OptGroupTest.java  | 44 ++--
 .../apache/struts2/views/jsp/ui/OptGroup-6.txt  | 40 ++
 20 files changed, 295 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/3b25242c/core/src/main/resources/template/simple/checkboxlist.ftl
--
diff --cc core/src/main/resources/template/simple/checkboxlist.ftl
index 35c1fd3,be5f55a..d50a98f
--- a/core/src/main/resources/template/simple/checkboxlist.ftl
+++ b/core/src/main/resources/template/simple/checkboxlist.ftl
@@@ -29,10 -29,14 +29,14 @@@
  <#else>
  <#assign itemKey = stack.findValue('top')/>
  
- <#if parameters.listValue??>
+ <#if parameters.listLabelKey??>
+ <#-- checks the valueStack for the 'valueKey.' The valueKey is then 
looked-up in the locale 
+file for it's localized value.  This is then used as a label -->
+ <#assign itemValue = 
struts.getText(stack.findString(parameters.listLabelKey))/>
+ <#elseif parameters.listValue??>
 -<#assign itemValue = 
stack.findString(parameters.listValue)?default("")/>
 +<#assign itemValue = stack.findString(parameters.listValue)!""/>
- <#else>
- <#assign itemValue = stack.findString('top')/>
+ <#else>
+  <#assign itemValue = stack.findString('top')/>
  
  <#if parameters.listCssClass??>
  <#if stack.findString(parameters.listCssClass)??>

http://git-wip-us.apache.org/repos/asf/struts/blob/3b25242c/core/src/main/resources/template/simple/radiomap.ftl
--

http://git-wip-us.apache.org/repos/asf/struts/blob/3b25242c/core/src/main/resources/template/simple/select.ftl
--

http://git-wip-us.apache.org/repos/asf/struts/blob/3b25242c/core/src/site/resources/tags/checkboxlist.html
--
diff --cc core/src/site/resources/tags/checkboxlist.html
index ac77ab7,1bcb2ea..5359aa9
--- a/core/src/site/resources/tags/checkboxlist.html
+++ b/core/src/site/resources/tags/checkboxlist.html
@@@ -1,440 -1,432 +1,456 @@@
 -
 -
 -
 -  checkboxlist
 -  
 -
 -  
 -  Tag Name: checkboxlist
 -  Description
 -  
 -  
 -  Render a list of checkboxes
 -  
 -  
 -
 -  Attributes
 -  
 -  
 -  
 -  Dynamic Attributes 
Allowed: true
 -  
 -  
 -   
 -  
 -  
 -  Name
 -  Required
 -  Default
 -  Evaluated
 -  Type
 -  Description
 -  
 - 

[07/17] git commit: Merge remote-tracking branch 'abrin/feature-WW-4295-localization' into feature/WW-4295-localization

2014-07-30 Thread lukaszlenart
Merge remote-tracking branch 'abrin/feature-WW-4295-localization' into 
feature/WW-4295-localization


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

Branch: refs/heads/develop
Commit: 23498a332119486a043e852366dfb73495a510d9
Parents: b78349a 6def514
Author: Lukasz Lenart 
Authored: Fri Jun 27 08:40:49 2014 +0200
Committer: Lukasz Lenart 
Committed: Fri Jun 27 08:40:49 2014 +0200

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


http://git-wip-us.apache.org/repos/asf/struts/blob/23498a33/core/src/main/java/org/apache/struts2/components/ListUIBean.java
--
diff --cc core/src/main/java/org/apache/struts2/components/ListUIBean.java
index 11e59aa,69deae4..c9f704a
--- a/core/src/main/java/org/apache/struts2/components/ListUIBean.java
+++ b/core/src/main/java/org/apache/struts2/components/ListUIBean.java
@@@ -48,8 -48,8 +48,9 @@@ import java.util.Map
  public abstract class ListUIBean extends UIBean {
  protected Object list;
  protected String listKey;
+ protected String listValueKey;
  protected String listValue;
 +protected String listLabelKey;
  protected String listCssClass;
  protected String listCssStyle;
  protected String listTitle;



[14/17] git commit: Extends test case to demonstrate possible usage of listValueKey

2014-07-30 Thread lukaszlenart
Extends test case to demonstrate possible usage of listValueKey


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

Branch: refs/heads/develop
Commit: 8e6f198d41c01aa4b34645f558b209190f72510b
Parents: d20c2f1
Author: Lukasz Lenart 
Authored: Wed Jul 30 09:08:34 2014 +0200
Committer: Lukasz Lenart 
Committed: Wed Jul 30 09:08:34 2014 +0200

--
 .../views/jsp/ui/LocaleKeyValueTest.java| 11 ++
 .../struts2/views/jsp/ui/LocaleTestAction.java  | 17 
 .../struts2/views/jsp/ui/OptGroupTest.java  | 21 
 .../apache/struts2/views/jsp/ui/OptGroup-6.txt  |  8 
 4 files changed, 40 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/8e6f198d/core/src/test/java/org/apache/struts2/views/jsp/ui/LocaleKeyValueTest.java
--
diff --git 
a/core/src/test/java/org/apache/struts2/views/jsp/ui/LocaleKeyValueTest.java 
b/core/src/test/java/org/apache/struts2/views/jsp/ui/LocaleKeyValueTest.java
new file mode 100644
index 000..5ea01a7
--- /dev/null
+++ b/core/src/test/java/org/apache/struts2/views/jsp/ui/LocaleKeyValueTest.java
@@ -0,0 +1,11 @@
+package org.apache.struts2.views.jsp.ui;
+
+public enum LocaleKeyValueTest {
+
+ONE, TWO, THREE;
+
+public String getValueKey() {
+return getClass().getSimpleName() + "." + name();
+}
+
+}

http://git-wip-us.apache.org/repos/asf/struts/blob/8e6f198d/core/src/test/java/org/apache/struts2/views/jsp/ui/LocaleTestAction.java
--
diff --git 
a/core/src/test/java/org/apache/struts2/views/jsp/ui/LocaleTestAction.java 
b/core/src/test/java/org/apache/struts2/views/jsp/ui/LocaleTestAction.java
new file mode 100644
index 000..ad2a4b5
--- /dev/null
+++ b/core/src/test/java/org/apache/struts2/views/jsp/ui/LocaleTestAction.java
@@ -0,0 +1,17 @@
+package org.apache.struts2.views.jsp.ui;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.apache.struts2.TestAction;
+
+import com.opensymphony.xwork2.Action;
+
+public class LocaleTestAction extends TestAction implements Action {
+
+@SuppressWarnings("unused")
+public List getSelectValues() {
+return Arrays.asList(LocaleKeyValueTest.values());
+}
+
+}

http://git-wip-us.apache.org/repos/asf/struts/blob/8e6f198d/core/src/test/java/org/apache/struts2/views/jsp/ui/OptGroupTest.java
--
diff --git 
a/core/src/test/java/org/apache/struts2/views/jsp/ui/OptGroupTest.java 
b/core/src/test/java/org/apache/struts2/views/jsp/ui/OptGroupTest.java
index 038cb6a..de9d34b 100644
--- a/core/src/test/java/org/apache/struts2/views/jsp/ui/OptGroupTest.java
+++ b/core/src/test/java/org/apache/struts2/views/jsp/ui/OptGroupTest.java
@@ -23,13 +23,9 @@ package org.apache.struts2.views.jsp.ui;
 
 import java.util.LinkedHashMap;
 
-import com.opensymphony.xwork2.Action;
 import org.apache.struts2.TestAction;
 import org.apache.struts2.views.jsp.AbstractUITagTest;
 
-/**
- *
- */
 public class OptGroupTest extends AbstractUITagTest {
 
 public void testOptGroupSimple() throws Exception {
@@ -129,7 +125,7 @@ public class OptGroupTest extends AbstractUITagTest {

((TestAction)action).setMap(new LinkedHashMap() {{
put("AAA", "aaa");
-   put(new Long(11), "bbb");
+   put(11L, "bbb");
put("CCC", "ccc");
}});

@@ -192,20 +188,19 @@ public class OptGroupTest extends AbstractUITagTest {
 verify(SelectTag.class.getResource("OptGroup-5.txt"));
 }
 
+
 public void testOptGroupWithValueKey() throws Exception {
 SelectTag selectTag = new SelectTag();
 selectTag.setName("mySelection");
 selectTag.setLabel("My Selection");
-selectTag.setList("%{#{'ONE':'one','TWO':'two','THREE':'three'}}");
+selectTag.setList("selectValues");
 selectTag.setListValueKey("valueKey");
 
-stack.push(new Action() {
-public String execute() throws Exception {
-return SUCCESS;
-}
-
-public String getValueKey() { return "MyValue"; }
-});
+LocaleTestAction localeTestAction = new LocaleTestAction();
+
+localeTestAction.setText("LocaleKeyValueTest.ONE","Edno");
+localeTestAction.setText("LocaleKeyValueTest.TWO","Dve");
+stack.push(localeTestAction);
 
 OptGroupTag optGroupTag1 = new OptGroupTag();
 optGroupTag1.setLabel("My Label 1");

http:/

[04/17] git commit: Adds autogenerated files

2014-07-30 Thread lukaszlenart
Adds autogenerated files


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

Branch: refs/heads/develop
Commit: 7e98fe7a731b44bb85375f9363465838803a0a16
Parents: 69df870
Author: Lukasz Lenart 
Authored: Thu Mar 20 08:08:50 2014 +0100
Committer: Lukasz Lenart 
Committed: Thu Mar 20 08:08:50 2014 +0100

--
 core/src/site/resources/tags/checkboxlist.html | 8 
 core/src/site/resources/tags/doubleselect.html | 8 
 core/src/site/resources/tags/inputtransferselect.html  | 8 
 core/src/site/resources/tags/optiontransferselect.html | 8 
 core/src/site/resources/tags/radio.html| 8 
 core/src/site/resources/tags/select.html   | 8 
 core/src/site/resources/tags/updownselect.html | 8 
 7 files changed, 56 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/7e98fe7a/core/src/site/resources/tags/checkboxlist.html
--
diff --git a/core/src/site/resources/tags/checkboxlist.html 
b/core/src/site/resources/tags/checkboxlist.html
index 0ad3225..95e2e97 100644
--- a/core/src/site/resources/tags/checkboxlist.html
+++ b/core/src/site/resources/tags/checkboxlist.html
@@ -170,6 +170,14 @@ Please do not edit it directly.
 Property 
of list objects to get field value from


+   listLabelKey
+   false
+   
+   false
+   String
+   Property 
of list objects to be used to lookup for localised version of field label
+   
+   
listTitle
false


http://git-wip-us.apache.org/repos/asf/struts/blob/7e98fe7a/core/src/site/resources/tags/doubleselect.html
--
diff --git a/core/src/site/resources/tags/doubleselect.html 
b/core/src/site/resources/tags/doubleselect.html
index 00a1558..becaf8b 100644
--- a/core/src/site/resources/tags/doubleselect.html
+++ b/core/src/site/resources/tags/doubleselect.html
@@ -458,6 +458,14 @@ Please do not edit it directly.
 Property 
of list objects to get field value from


+   listLabelKey
+   false
+   
+   false
+   String
+   Property 
of list objects to be used to lookup for localised version of field label
+   
+   
listTitle
false


http://git-wip-us.apache.org/repos/asf/struts/blob/7e98fe7a/core/src/site/resources/tags/inputtransferselect.html
--
diff --git a/core/src/site/resources/tags/inputtransferselect.html 
b/core/src/site/resources/tags/inputtransferselect.html
index 4c33f7c..9f1a1e1 100644
--- a/core/src/site/resources/tags/inputtransferselect.html
+++ b/core/src/site/resources/tags/inputtransferselect.html
@@ -242,6 +242,14 @@ Please do not edit it directly.
 Property 
of list objects to get field value from


+   listLabelKey
+   false
+   
+   false
+   String
+   Property 
of list objects to be used to lookup for localised version of field label
+   
+   
listTitle
false


http://git-wip-us.apache.org/repos/asf/struts/blob/7e98fe7a/core/src/site/resources/tags/optiontransferselect.html
--
diff --git a/co

[03/17] git commit: Extends template to use the new field to localise value's label

2014-07-30 Thread lukaszlenart
Extends template to use the new field to localise value's label


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

Branch: refs/heads/develop
Commit: 69df87047ab2a72c339a0ee320459757ba439f40
Parents: 9018936
Author: Lukasz Lenart 
Authored: Thu Mar 20 08:08:27 2014 +0100
Committer: Lukasz Lenart 
Committed: Thu Mar 20 08:08:27 2014 +0100

--
 core/src/main/resources/template/simple/checkboxlist.ftl | 10 --
 1 file changed, 4 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/69df8704/core/src/main/resources/template/simple/checkboxlist.ftl
--
diff --git a/core/src/main/resources/template/simple/checkboxlist.ftl 
b/core/src/main/resources/template/simple/checkboxlist.ftl
index 9662e42..e2e569c 100644
--- a/core/src/main/resources/template/simple/checkboxlist.ftl
+++ b/core/src/main/resources/template/simple/checkboxlist.ftl
@@ -29,16 +29,14 @@
 <#else>
 <#assign itemKey = stack.findValue('top')/>
 
-  <#if parameters.listValueKey??>
+<#if parameters.listLabelKey??>
 <#-- checks the valueStack for the 'valueKey.' The valueKey is then 
looked-up in the locale 
file for it's localized value.  This is then used as a label -->
-<#assign itemValue = stack.findString(parameters.listValueKey)/>
-<#-- FIXME: find a better way to get the value than a call to @s.text -->
-<#assign itemValue><@s.text name="${itemValue}"/>
+<#assign itemValue = 
struts.getText(stack.findString(parameters.listLabelKey))/>
 <#elseif parameters.listValue??>
 <#assign itemValue = 
stack.findString(parameters.listValue)?default("")/>
-<#else>
-<#assign itemValue = stack.findString('top')/>
+<#else>
+ <#assign itemValue = stack.findString('top')/>
 
 <#if parameters.listCssClass??>
 <#if stack.findString(parameters.listCssClass)??>



[02/17] git commit: Adds additional field to allow set label key used in I18N lookup

2014-07-30 Thread lukaszlenart
Adds additional field to allow set label key used in I18N lookup


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

Branch: refs/heads/develop
Commit: 901893628b31ee3b38b2fc9196045a097a0f4217
Parents: 7f586d3
Author: Lukasz Lenart 
Authored: Thu Mar 20 08:08:03 2014 +0100
Committer: Lukasz Lenart 
Committed: Thu Mar 20 08:08:03 2014 +0100

--
 .../java/org/apache/struts2/components/ListUIBean.java   | 11 +++
 .../org/apache/struts2/views/jsp/ui/AbstractListTag.java |  6 ++
 2 files changed, 17 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/90189362/core/src/main/java/org/apache/struts2/components/ListUIBean.java
--
diff --git a/core/src/main/java/org/apache/struts2/components/ListUIBean.java 
b/core/src/main/java/org/apache/struts2/components/ListUIBean.java
index b1a4493..11e59aa 100644
--- a/core/src/main/java/org/apache/struts2/components/ListUIBean.java
+++ b/core/src/main/java/org/apache/struts2/components/ListUIBean.java
@@ -49,6 +49,7 @@ public abstract class ListUIBean extends UIBean {
 protected Object list;
 protected String listKey;
 protected String listValue;
+protected String listLabelKey;
 protected String listCssClass;
 protected String listCssStyle;
 protected String listTitle;
@@ -115,6 +116,11 @@ public abstract class ListUIBean extends UIBean {
 addParameter("listValue", "value");
 }
 
+if (listLabelKey != null) {
+listLabelKey = stripExpressionIfAltSyntax(listLabelKey);
+addParameter("listLabelKey", listLabelKey);
+}
+
 if (listCssClass != null && listCssClass.trim().length() > 0) {
 addParameter("listCssClass", listCssClass);
 }
@@ -152,6 +158,11 @@ public abstract class ListUIBean extends UIBean {
 this.listValue = listValue;
 }
 
+@StrutsTagAttribute(description = "Property of list objects to be used to 
lookup for localised version of field label")
+public void setListLabelKey(String listLabelKey) {
+this.listLabelKey = listLabelKey;
+}
+
 @StrutsTagAttribute(description = "Property of list objects to get css 
class from")
 public void setListCssClass(String listCssClass) {
 this.listCssClass = listCssClass;

http://git-wip-us.apache.org/repos/asf/struts/blob/90189362/core/src/main/java/org/apache/struts2/views/jsp/ui/AbstractListTag.java
--
diff --git 
a/core/src/main/java/org/apache/struts2/views/jsp/ui/AbstractListTag.java 
b/core/src/main/java/org/apache/struts2/views/jsp/ui/AbstractListTag.java
index 1f2ebb4..4972ff0 100644
--- a/core/src/main/java/org/apache/struts2/views/jsp/ui/AbstractListTag.java
+++ b/core/src/main/java/org/apache/struts2/views/jsp/ui/AbstractListTag.java
@@ -29,6 +29,7 @@ public abstract class AbstractListTag extends AbstractUITag {
 protected String list;
 protected String listKey;
 protected String listValue;
+protected String listLabelKey;
 protected String listCssClass;
 protected String listCssStyle;
 protected String listTitle;
@@ -40,6 +41,7 @@ public abstract class AbstractListTag extends AbstractUITag {
 listUIBean.setList(list);
 listUIBean.setListKey(listKey);
 listUIBean.setListValue(listValue);
+listUIBean.setListLabelKey(listLabelKey);
 listUIBean.setListCssClass(listCssClass);
 listUIBean.setListCssStyle(listCssStyle);
 listUIBean.setListTitle(listTitle);
@@ -57,6 +59,10 @@ public abstract class AbstractListTag extends AbstractUITag {
 this.listValue = listValue;
 }
 
+public void setListLabelKey(String listLabelKey) {
+this.listLabelKey = listLabelKey;
+}
+
 public void setListCssClass(String listCssClass) {
 this.listCssClass = listCssClass;
 }



[12/17] git commit: Extends test to use the new attribute

2014-07-30 Thread lukaszlenart
Extends test to use the new attribute


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

Branch: refs/heads/develop
Commit: d67fce1f2577229139938d4588bb970c3f869078
Parents: ed8a0b8
Author: Lukasz Lenart 
Authored: Fri Jun 27 12:56:01 2014 +0200
Committer: Lukasz Lenart 
Committed: Fri Jun 27 12:56:01 2014 +0200

--
 .../struts2/views/jsp/ui/OptGroupTest.java  | 41 
 .../apache/struts2/views/jsp/ui/OptGroup-6.txt  | 40 +++
 2 files changed, 81 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/d67fce1f/core/src/test/java/org/apache/struts2/views/jsp/ui/OptGroupTest.java
--
diff --git 
a/core/src/test/java/org/apache/struts2/views/jsp/ui/OptGroupTest.java 
b/core/src/test/java/org/apache/struts2/views/jsp/ui/OptGroupTest.java
index c11f511..038cb6a 100644
--- a/core/src/test/java/org/apache/struts2/views/jsp/ui/OptGroupTest.java
+++ b/core/src/test/java/org/apache/struts2/views/jsp/ui/OptGroupTest.java
@@ -23,6 +23,7 @@ package org.apache.struts2.views.jsp.ui;
 
 import java.util.LinkedHashMap;
 
+import com.opensymphony.xwork2.Action;
 import org.apache.struts2.TestAction;
 import org.apache.struts2.views.jsp.AbstractUITagTest;
 
@@ -190,4 +191,44 @@ public class OptGroupTest extends AbstractUITagTest {
 //System.out.println(writer.toString());
 verify(SelectTag.class.getResource("OptGroup-5.txt"));
 }
+
+public void testOptGroupWithValueKey() throws Exception {
+SelectTag selectTag = new SelectTag();
+selectTag.setName("mySelection");
+selectTag.setLabel("My Selection");
+selectTag.setList("%{#{'ONE':'one','TWO':'two','THREE':'three'}}");
+selectTag.setListValueKey("valueKey");
+
+stack.push(new Action() {
+public String execute() throws Exception {
+return SUCCESS;
+}
+
+public String getValueKey() { return "MyValue"; }
+});
+
+OptGroupTag optGroupTag1 = new OptGroupTag();
+optGroupTag1.setLabel("My Label 1");
+optGroupTag1.setList("%{#{'AAA':'aaa','BBB':'bbb','CCC':'ccc'}}");
+
+OptGroupTag optGroupTag2 = new OptGroupTag();
+optGroupTag2.setLabel("My Label 2");
+optGroupTag2.setList("%{#{'DDD':'ddd','EEE':'eee','FFF':'fff'}}");
+
+selectTag.setPageContext(pageContext);
+selectTag.doStartTag();
+optGroupTag1.setPageContext(pageContext);
+optGroupTag1.doStartTag();
+optGroupTag1.doEndTag();
+optGroupTag2.setPageContext(pageContext);
+optGroupTag2.doStartTag();
+optGroupTag2.doEndTag();
+selectTag.doEndTag();
+
+
+//System.out.println(writer.toString());
+verify(SelectTag.class.getResource("OptGroup-6.txt"));
+}
+
+
 }

http://git-wip-us.apache.org/repos/asf/struts/blob/d67fce1f/core/src/test/resources/org/apache/struts2/views/jsp/ui/OptGroup-6.txt
--
diff --git 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/OptGroup-6.txt 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/OptGroup-6.txt
new file mode 100644
index 000..401ef44
--- /dev/null
+++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/OptGroup-6.txt
@@ -0,0 +1,40 @@
+
+My 
Selection:
+
+
+MyValue
+MyValue
+MyValue
+
+
+
+   aaa
+   
+   bbb
+   
+   ccc
+   
+
+
+
+   ddd
+   
+   eee
+   
+   fff
+   
+
+
+
+
+
\ No newline at end of file



[05/17] git commit: Extends blank app to demonstrate the new possibilities

2014-07-30 Thread lukaszlenart
Extends blank app to demonstrate the new possibilities


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

Branch: refs/heads/develop
Commit: b78349ad5dade8a47fb335f6ef18c13a36101842
Parents: 7e98fe7
Author: Lukasz Lenart 
Authored: Thu Mar 20 08:12:13 2014 +0100
Committer: Lukasz Lenart 
Committed: Thu Mar 20 08:12:13 2014 +0100

--
 apps/blank/src/main/java/example/HelloWorld.java  | 7 +++
 apps/blank/src/main/java/example/YesNo.java   | 5 +
 apps/blank/src/main/resources/example/package.properties  | 2 ++
 apps/blank/src/main/webapp/WEB-INF/jsp/example/HelloWorld.jsp | 2 ++
 4 files changed, 16 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/b78349ad/apps/blank/src/main/java/example/HelloWorld.java
--
diff --git a/apps/blank/src/main/java/example/HelloWorld.java 
b/apps/blank/src/main/java/example/HelloWorld.java
index d5268ca..73a5221 100644
--- a/apps/blank/src/main/java/example/HelloWorld.java
+++ b/apps/blank/src/main/java/example/HelloWorld.java
@@ -21,6 +21,9 @@
 
 package example;
 
+import java.util.Arrays;
+import java.util.List;
+
 /**
  * Set welcome message.
  */
@@ -58,4 +61,8 @@ public class HelloWorld extends ExampleSupport {
 public void setMessage(String message) {
 this.message = message;
 }
+
+public List getValues() {
+return Arrays.asList(YesNo.values());
+}
 }

http://git-wip-us.apache.org/repos/asf/struts/blob/b78349ad/apps/blank/src/main/java/example/YesNo.java
--
diff --git a/apps/blank/src/main/java/example/YesNo.java 
b/apps/blank/src/main/java/example/YesNo.java
new file mode 100644
index 000..d27ed7c
--- /dev/null
+++ b/apps/blank/src/main/java/example/YesNo.java
@@ -0,0 +1,5 @@
+package example;
+
+public enum YesNo {
+YES, NO
+}

http://git-wip-us.apache.org/repos/asf/struts/blob/b78349ad/apps/blank/src/main/resources/example/package.properties
--
diff --git a/apps/blank/src/main/resources/example/package.properties 
b/apps/blank/src/main/resources/example/package.properties
index c1f4b33..1ac0e71 100644
--- a/apps/blank/src/main/resources/example/package.properties
+++ b/apps/blank/src/main/resources/example/package.properties
@@ -3,3 +3,5 @@ requiredstring = ${getText(fieldName)} is required.
 password = Password
 username = User Name
 Missing.message =  This feature is under construction. Please try again in the 
next interation.
+test-yes=Yo
+test-no=Nein

http://git-wip-us.apache.org/repos/asf/struts/blob/b78349ad/apps/blank/src/main/webapp/WEB-INF/jsp/example/HelloWorld.jsp
--
diff --git a/apps/blank/src/main/webapp/WEB-INF/jsp/example/HelloWorld.jsp 
b/apps/blank/src/main/webapp/WEB-INF/jsp/example/HelloWorld.jsp
index 938c761..f10fc02 100644
--- a/apps/blank/src/main/webapp/WEB-INF/jsp/example/HelloWorld.jsp
+++ b/apps/blank/src/main/webapp/WEB-INF/jsp/example/HelloWorld.jsp
@@ -24,5 +24,7 @@
 
 
 
+
+
 
 



[13/17] git commit: Merge branch 'develop' into feature/WW-4295-localization

2014-07-30 Thread lukaszlenart
Merge branch 'develop' into feature/WW-4295-localization

Conflicts:
core/src/site/resources/tags/checkboxlist.html


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

Branch: refs/heads/develop
Commit: d20c2f10b7ccb2830eb255062b45941684b55336
Parents: d67fce1 63de773
Author: Lukasz Lenart 
Authored: Fri Jun 27 13:15:10 2014 +0200
Committer: Lukasz Lenart 
Committed: Fri Jun 27 13:15:10 2014 +0200

--
 apps/blank/pom.xml  |   2 +-
 apps/jboss-blank/pom.xml|   2 +-
 apps/mailreader/pom.xml |   2 +-
 apps/pom.xml|   2 +-
 apps/portlet/pom.xml|   2 +-
 apps/rest-showcase/pom.xml  |   4 +-
 apps/showcase/pom.xml   |   2 +-
 archetypes/pom.xml  |   2 +-
 archetypes/struts2-archetype-angularjs/pom.xml  |   2 +-
 archetypes/struts2-archetype-blank/pom.xml  |   2 +-
 .../src/main/resources/example.xml  |   6 +-
 .../main/webapp/WEB-INF/example/HelloWorld.jsp  |  28 ++
 .../src/main/webapp/WEB-INF/example/Login.jsp   |  15 +
 .../src/main/webapp/WEB-INF/example/Menu.jsp|   3 +
 .../src/main/webapp/WEB-INF/example/Missing.jsp |  11 +
 .../main/webapp/WEB-INF/example/Register.jsp|   3 +
 .../src/main/webapp/WEB-INF/example/Welcome.jsp |  18 +
 .../src/main/webapp/example/HelloWorld.jsp  |  28 --
 .../src/main/webapp/example/Login.jsp   |  15 -
 .../src/main/webapp/example/Menu.jsp|   3 -
 .../src/main/webapp/example/Missing.jsp |  11 -
 .../src/main/webapp/example/Register.jsp|   3 -
 .../src/main/webapp/example/Welcome.jsp |  18 -
 archetypes/struts2-archetype-convention/pom.xml |   2 +-
 archetypes/struts2-archetype-dbportlet/pom.xml  |   2 +-
 archetypes/struts2-archetype-plugin/pom.xml |   2 +-
 archetypes/struts2-archetype-portlet/pom.xml|   2 +-
 archetypes/struts2-archetype-starter/pom.xml|   2 +-
 .../src/main/resources/struts.xml   |   4 +-
 .../src/main/webapp/WEB-INF/jsp/helloWorld.jsp  |  16 +
 .../src/main/webapp/WEB-INF/jsp/index.jsp   |  20 +
 .../src/main/webapp/jsp/helloWorld.jsp  |  16 -
 .../src/main/webapp/jsp/index.jsp   |  20 -
 assembly/pom.xml|  88 ++---
 assembly/src/main/assembly/all.xml  |  12 +-
 assembly/src/main/assembly/docs.xml |   2 +-
 bundles/admin/pom.xml   |   2 +-
 bundles/demo/pom.xml|   2 +-
 bundles/pom.xml |   2 +-
 core/pom.xml|   2 +-
 .../org/apache/struts2/StrutsConstants.java |  16 +
 .../struts2/components/DateTextField.java   |  51 +++
 .../struts2/components/GenericUIBean.java   |   5 +-
 .../org/apache/struts2/components/UIBean.java   |   9 +-
 .../config/DefaultBeanSelectionProvider.java|  22 +-
 .../dispatcher/ServletRedirectResult.java   |  48 ++-
 .../struts2/dispatcher/StrutsResultSupport.java |  75 +++-
 .../struts2/interceptor/CookieInterceptor.java  |  75 +++-
 .../interceptor/DateTextFieldInterceptor.java   | 128 +++
 .../views/freemarker/FreemarkerResult.java  |  18 +-
 .../struts2/views/jsp/ui/DateTextFieldTag.java  |  35 ++
 .../org/apache/struts2/default.properties   |   6 +-
 .../struts2/interceptor/debugging/browser.ftl   |  21 +-
 .../struts2/interceptor/debugging/console.ftl   |   4 +-
 .../interceptor/debugging/webconsole.html   |  30 +-
 .../struts2/interceptor/debugging/webconsole.js |  99 +++--
 core/src/main/resources/struts-default.xml  |  32 +-
 .../resources/template/css_xhtml/checkbox.ftl   |  17 +-
 .../template/css_xhtml/controlfooter.ftl|   7 +-
 .../template/css_xhtml/controlheader-core.ftl   |   9 +-
 .../template/css_xhtml/controlheader.ftl|   7 +-
 .../main/resources/template/css_xhtml/reset.ftl |   9 +-
 .../template/css_xhtml/submit-close.ftl |   7 +-
 .../resources/template/css_xhtml/submit.ftl |   7 +-
 .../resources/template/simple/checkboxlist.ftl  |  14 +-
 .../main/resources/template/simple/radiomap.ftl |   8 -
 .../main/resources/template/xhtml/checkbox.ftl  |  15 +-
 .../template/xhtml/controlheader-core.ftl   |   9 +-
 core/src/site/resources/tags/datetextfield.html | 376 +++
 .../struts2/TestConfigurationProvider.java  |   5 +
 .../dispatcher/ServletRedirectResultTest.java   | 109 --
 .../dispatcher/StrutsResultSupportTest.java |  31 ++
 .../interceptor/CookieInterceptorTest.java  | 130 +++
 .../DateTextFieldInterceptorTest.java   

[01/17] git commit: [PATCH] First attempt at enabling value-labels to be pulled from Locale Files. Adding listValueKey attribute to checkboxList, radioMap, and select tags.

2014-07-30 Thread lukaszlenart
Repository: struts
Updated Branches:
  refs/heads/develop 935cd33f7 -> 09012d7e5
  refs/heads/feature/WW-4295-localization d20c2f10b -> 8e6f198d4


[PATCH] First attempt at enabling value-labels to be pulled from
 Locale Files.  Adding listValueKey attribute to checkboxList, radioMap, and
 select tags.

Issues:
This implementation uses the <@s.text> tag to handle the localization with an 
assignment. I presume this is less than idea, but I lack the knowledge of the 
Struts2 tag model that would suggest where to check for this on the valueStack 
or elsewhere.

Example:

public enum yesno {
YES, NO;
}

<@s.radio name="yes no" list="#{yesno.values()}" valueKey="name()" />


+<#assign itemValue = stack.findString(parameters.listValueKey)/>
+<#-- FIXME: find a better way to get the value than a call to @s.text -->
+<#assign itemValue><@s.text name="${itemValue}"/>
+<#elseif parameters.listValue??>
 <#assign itemValue = 
stack.findString(parameters.listValue)?default("")/>
 <#else>
 <#assign itemValue = stack.findString('top')/>

http://git-wip-us.apache.org/repos/asf/struts/blob/7f586d39/core/src/main/resources/template/simple/radiomap.ftl
--
diff --git a/core/src/main/resources/template/simple/radiomap.ftl 
b/core/src/main/resources/template/simple/radiomap.ftl
index ab6d42c..183fd57 100644
--- a/core/src/main/resources/template/simple/radiomap.ftl
+++ b/core/src/main/resources/template/simple/radiomap.ftl
@@ -27,7 +27,13 @@
 <#assign itemKey = stack.findValue('top')/>
 
 <#assign itemKeyStr = itemKey.toString() />
-<#if parameters.listValue??>
+<#if parameters.listValueKey??>
+<#-- checks the valueStack for the 'valueKey.' The valueKey is then 
looked-up in the locale 
+ file for it's localized value.  This is then used as a label -->
+<#assign itemValue = stack.findString(parameters.listValueKey)/>
+<#-- FIXME: find a better way to get the value than a call to @s.text 
-->
+<#assign itemValue><@s.text name="${itemValue}"/>
+<#elseif parameters.listValue??>
 <#assign itemValue = stack.findString(parameters.listValue)/>
 <#else>
 <#assign itemValue = stack.findString('top')/>

http://git-wip-us.apache.org/repos/asf/struts/blob/7f586d39/core/src/main/resources/template/simple/select.ftl
--
diff --git a/core/src/main/resources/template/simple/select.ftl 
b/core/src/main/resources/template/simple/select.ftl
index 74277e6..f4f27bf 100644
--- a/core/src/main/resources/template/simple/select.ftl
+++ b/core/src/main/resources/template/simple/select.ftl
@@ -69,7 +69,13 @@
 <#assign itemKey = stack.findValue('top')/>
 <#assign itemKeyStr = stack.findString('top')>
 
-<#if parameters.listValue??>
+<#if parameters.listValueKey??>
+  <#-- checks the valueStack for the 'valueKey.' The valueKey is then 
looked-up in the locale file for it's 
+ localized value.  This is then used as a label -->
+  <#assign itemValue = stack.findString(parameters.listValueKey)/>
+  <#-- FIXME: find a better way to get the value than a call to 
@s.text -->
+  <#assign itemValue><@s.text name="${itemValue}"/>
+<#elseif parameters.listValue??>
 <#if stack.findString(parameters.listValue)??>
   <#assign itemValue = stack.findString(parameters.listValue)/>
 <#else>



[09/17] git commit: Adds missing tag attribute field

2014-07-30 Thread lukaszlenart
Adds missing tag attribute field


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

Branch: refs/heads/develop
Commit: 13269fa15f02409732ca51545141a40ae2f4680c
Parents: ca230ab
Author: Lukasz Lenart 
Authored: Fri Jun 27 12:54:44 2014 +0200
Committer: Lukasz Lenart 
Committed: Fri Jun 27 12:54:44 2014 +0200

--
 .../java/org/apache/struts2/views/jsp/ui/AbstractListTag.java  | 6 ++
 1 file changed, 6 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/13269fa1/core/src/main/java/org/apache/struts2/views/jsp/ui/AbstractListTag.java
--
diff --git 
a/core/src/main/java/org/apache/struts2/views/jsp/ui/AbstractListTag.java 
b/core/src/main/java/org/apache/struts2/views/jsp/ui/AbstractListTag.java
index 4972ff0..9b96f4a 100644
--- a/core/src/main/java/org/apache/struts2/views/jsp/ui/AbstractListTag.java
+++ b/core/src/main/java/org/apache/struts2/views/jsp/ui/AbstractListTag.java
@@ -29,6 +29,7 @@ public abstract class AbstractListTag extends AbstractUITag {
 protected String list;
 protected String listKey;
 protected String listValue;
+protected String listValueKey;
 protected String listLabelKey;
 protected String listCssClass;
 protected String listCssStyle;
@@ -41,6 +42,7 @@ public abstract class AbstractListTag extends AbstractUITag {
 listUIBean.setList(list);
 listUIBean.setListKey(listKey);
 listUIBean.setListValue(listValue);
+listUIBean.setListValueKey(listValueKey);
 listUIBean.setListLabelKey(listLabelKey);
 listUIBean.setListCssClass(listCssClass);
 listUIBean.setListCssStyle(listCssStyle);
@@ -59,6 +61,10 @@ public abstract class AbstractListTag extends AbstractUITag {
 this.listValue = listValue;
 }
 
+public void setListValueKey(String listValueKey) {
+this.listValueKey = listValueKey;
+}
+
 public void setListLabelKey(String listLabelKey) {
 this.listLabelKey = listLabelKey;
 }



[17/17] git commit: Closes #7 Closes #18

2014-07-30 Thread lukaszlenart
Closes #7
Closes #18


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

Branch: refs/heads/develop
Commit: 09012d7e5f7177002893da3b2add091b04c62657
Parents: 3b25242
Author: Lukasz Lenart 
Authored: Wed Jul 30 09:16:01 2014 +0200
Committer: Lukasz Lenart 
Committed: Wed Jul 30 09:16:01 2014 +0200

--
 .../test/java/org/apache/struts2/views/jsp/ui/OptGroupTest.java| 2 --
 1 file changed, 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/09012d7e/core/src/test/java/org/apache/struts2/views/jsp/ui/OptGroupTest.java
--
diff --git 
a/core/src/test/java/org/apache/struts2/views/jsp/ui/OptGroupTest.java 
b/core/src/test/java/org/apache/struts2/views/jsp/ui/OptGroupTest.java
index de9d34b..bee7ade 100644
--- a/core/src/test/java/org/apache/struts2/views/jsp/ui/OptGroupTest.java
+++ b/core/src/test/java/org/apache/struts2/views/jsp/ui/OptGroupTest.java
@@ -188,7 +188,6 @@ public class OptGroupTest extends AbstractUITagTest {
 verify(SelectTag.class.getResource("OptGroup-5.txt"));
 }
 
-
 public void testOptGroupWithValueKey() throws Exception {
 SelectTag selectTag = new SelectTag();
 selectTag.setName("mySelection");
@@ -225,5 +224,4 @@ public class OptGroupTest extends AbstractUITagTest {
 verify(SelectTag.class.getResource("OptGroup-6.txt"));
 }
 
-
 }



[11/17] git commit: Checks is ListValueKey was defined and returns value

2014-07-30 Thread lukaszlenart
Checks is ListValueKey was defined and returns value


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

Branch: refs/heads/develop
Commit: ed8a0b87b29114ac5c99838e7d4cfc819ad71e43
Parents: a2791a8
Author: Lukasz Lenart 
Authored: Fri Jun 27 12:55:43 2014 +0200
Committer: Lukasz Lenart 
Committed: Fri Jun 27 12:55:43 2014 +0200

--
 core/src/main/resources/template/simple/select.ftl | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/ed8a0b87/core/src/main/resources/template/simple/select.ftl
--
diff --git a/core/src/main/resources/template/simple/select.ftl 
b/core/src/main/resources/template/simple/select.ftl
index f4f27bf..dcb4b97 100644
--- a/core/src/main/resources/template/simple/select.ftl
+++ b/core/src/main/resources/template/simple/select.ftl
@@ -72,9 +72,12 @@
 <#if parameters.listValueKey??>
   <#-- checks the valueStack for the 'valueKey.' The valueKey is then 
looked-up in the locale file for it's 
  localized value.  This is then used as a label -->
-  <#assign itemValue = stack.findString(parameters.listValueKey)/>
-  <#-- FIXME: find a better way to get the value than a call to 
@s.text -->
-  <#assign itemValue><@s.text name="${itemValue}"/>
+  <#assign valueKey = stack.findString(parameters.listValueKey) />
+  <#if valueKey??>
+  <#assign itemValue = struts.getText(valueKey) />
+  <#else>
+  <#assign itemValue = parameters.listValueKey />
+  
 <#elseif parameters.listValue??>
 <#if stack.findString(parameters.listValue)??>
   <#assign itemValue = stack.findString(parameters.listValue)/>



[08/17] git commit: Adds auto-generated tags' info

2014-07-30 Thread lukaszlenart
Adds auto-generated tags' info


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

Branch: refs/heads/develop
Commit: ca230ab30fde249d8af17cc5f2ba83ebe142d364
Parents: 23498a3
Author: Lukasz Lenart 
Authored: Fri Jun 27 12:54:26 2014 +0200
Committer: Lukasz Lenart 
Committed: Fri Jun 27 12:54:26 2014 +0200

--
 core/src/site/resources/tags/checkboxlist.html | 8 
 core/src/site/resources/tags/doubleselect.html | 8 
 core/src/site/resources/tags/inputtransferselect.html  | 8 
 core/src/site/resources/tags/optiontransferselect.html | 8 
 core/src/site/resources/tags/radio.html| 8 
 core/src/site/resources/tags/select.html   | 8 
 core/src/site/resources/tags/updownselect.html | 8 
 7 files changed, 56 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/ca230ab3/core/src/site/resources/tags/checkboxlist.html
--
diff --git a/core/src/site/resources/tags/checkboxlist.html 
b/core/src/site/resources/tags/checkboxlist.html
index 95e2e97..1bcb2ea 100644
--- a/core/src/site/resources/tags/checkboxlist.html
+++ b/core/src/site/resources/tags/checkboxlist.html
@@ -194,6 +194,14 @@ Please do not edit it directly.
Property 
of list objects to get field content from


+   listValueKey
+   false
+   
+   false
+   String
+Property 
of list objects to get field value label from
+   
+   
name
false


http://git-wip-us.apache.org/repos/asf/struts/blob/ca230ab3/core/src/site/resources/tags/doubleselect.html
--
diff --git a/core/src/site/resources/tags/doubleselect.html 
b/core/src/site/resources/tags/doubleselect.html
index becaf8b..674ecc2 100644
--- a/core/src/site/resources/tags/doubleselect.html
+++ b/core/src/site/resources/tags/doubleselect.html
@@ -482,6 +482,14 @@ Please do not edit it directly.
Property 
of list objects to get field content from


+   listValueKey
+   false
+   
+   false
+   String
+Property 
of list objects to get field value label from
+   
+   
multiple
false


http://git-wip-us.apache.org/repos/asf/struts/blob/ca230ab3/core/src/site/resources/tags/inputtransferselect.html
--
diff --git a/core/src/site/resources/tags/inputtransferselect.html 
b/core/src/site/resources/tags/inputtransferselect.html
index 9f1a1e1..176e915 100644
--- a/core/src/site/resources/tags/inputtransferselect.html
+++ b/core/src/site/resources/tags/inputtransferselect.html
@@ -266,6 +266,14 @@ Please do not edit it directly.
Property 
of list objects to get field content from


+   listValueKey
+   false
+   
+   false
+   String
+Property 
of list objects to get field value label from
+   
+   
multiple
false


http://git-wip-us.apache.org/repos/asf/struts/blob/ca230ab3/core/src/site/resources/tags/optiontransferselect.html
--
diff --git a/core/src/site/resources/tags/optiontransferselect.html 
b/core/src/site/resources

Git Push Summary

2014-07-30 Thread lukaszlenart
Repository: struts
Updated Branches:
  refs/heads/feature/WW-4295-localization [deleted] 8e6f198d4


[CONF] Confluence Changes in the last 24 hours

2014-07-30 Thread Anonymous (Confluence)
















  Confluence Changes in the last 24 hours  




 Apache ActiveMQ 

Pages

 Page: ActiveMQ Performance Module Users Manual edited by Jakub Korab [01:09 PM] (View Changes) 


 Apache Camel 

Pages

 Page: Camel 2.14.0 Release edited by Claus Ibsen [02:43 PM] (View Changes) 
 Page: Rest DSL edited by Claus Ibsen [09:57 AM] (View Changes) 
 Page: How do I import rests from other XML files created by Claus Ibsen [09:56 AM] 


 Drill Wiki 

Pages

 Page: Apache Drill Architectural Overview edited by Bridget Bevens [07:13 PM] (View Changes) 
 Page: Reserved Keywords created by Bridget Bevens [05:57 PM] 
 Home page: Apache Drill Wiki edited by Bridget Bevens [05:58 PM] (View Changes) 
 Page: Apache Drill Contribution Ideas created by Bridget Bevens [01:23 AM] 
 Page: Apache Drill in 10 Minutes edited by Bridget Bevens [12:51 AM] (View Changes) 


 Apache Empire DB 

Pages

 Page: Release Process edited by Francis De Brabandere [12:09 PM] (View Changes) 


 Apache Hive 

Pages

 Page: Hive on Spark: Getting Started edited by Brock Noland [07:21 PM] (View Changes) 
 Page: LanguageManual WindowingAndAnalytics edited by Lars Francke [08:43 AM] (View Changes) 
 Page: Configuration Properties edited by Lefty Leverenz [07:04 AM] (View Changes) 


 Apache Mesos 

Pages

 Page: Behavior Learning Component created by helpforteenagers [04:03 AM] 


 OFBiz Project Administration Workspace 

Pages

 Page: Apache OFBiz PMC (Project Management Committee) Members and Committers edited by Sharan Foga [03:48 PM] (View Changes) 
 Page: Apache OFBiz Contributors edited by Pierre Smits [03:47 PM] (View Changes) 
 Page: OFBiz