struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject [05/12] git commit: Extends blank app to demonstrate the new possibilities
Date Fri, 27 Jun 2014 11:06:50 GMT
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/feature/WW-4295-localization
Commit: b78349ad5dade8a47fb335f6ef18c13a36101842
Parents: 7e98fe7
Author: Lukasz Lenart <lukaszlenart@apache.org>
Authored: Thu Mar 20 08:12:13 2014 +0100
Committer: Lukasz Lenart <lukaszlenart@apache.org>
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;
+
 /**
  * <code>Set welcome message.</code>
  */
@@ -58,4 +61,8 @@ public class HelloWorld extends ExampleSupport {
     public void setMessage(String message) {
         this.message = message;
     }
+
+    public List<YesNo> 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 0000000..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 @@
     </li>
 </ul>
 
+<s:checkboxlist name="test" list="values" listLabelKey="'test-' + name().toLowerCase()"
/>
+
 </body>
 </html>


Mime
View raw message