You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2011/10/18 00:30:57 UTC

svn commit: r1185404 - in /tapestry/tapestry5/trunk: build.gradle tapestry-spring/src/test/java/org/example/testapp/pages/Start.java tapestry-spring/src/test/webapp/Start.tml tapestry-spring/src/test/webapp/WEB-INF/applicationContext.xml

Author: hlship
Date: Mon Oct 17 22:30:56 2011
New Revision: 1185404

URL: http://svn.apache.org/viewvc?rev=1185404&view=rev
Log:
TAP5-892: Set minimum servlet API version to 2.5
Create test to identify incorrect Locale injection (from Spring context)

Modified:
    tapestry/tapestry5/trunk/build.gradle
    tapestry/tapestry5/trunk/tapestry-spring/src/test/java/org/example/testapp/pages/Start.java
    tapestry/tapestry5/trunk/tapestry-spring/src/test/webapp/Start.tml
    tapestry/tapestry5/trunk/tapestry-spring/src/test/webapp/WEB-INF/applicationContext.xml

Modified: tapestry/tapestry5/trunk/build.gradle
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/build.gradle?rev=1185404&r1=1185403&r2=1185404&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/build.gradle (original)
+++ tapestry/tapestry5/trunk/build.gradle Mon Oct 17 22:30:56 2011
@@ -8,7 +8,7 @@ jettyVersion = '7.0.0.v20091005'
 tomcatVersion = '6.0.30'
 testngVersion = '5.14.9'
 easymockVersion = '3.0'
-servletAPIVersion = '2.4'
+servletAPIVersion = '2.5'
 
 // Provided so that Jenkins can override the normal version number for nightly builds.
 version = System.getProperty('project-version', tapestryVersion)

Modified: tapestry/tapestry5/trunk/tapestry-spring/src/test/java/org/example/testapp/pages/Start.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-spring/src/test/java/org/example/testapp/pages/Start.java?rev=1185404&r1=1185403&r2=1185404&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-spring/src/test/java/org/example/testapp/pages/Start.java (original)
+++ tapestry/tapestry5/trunk/tapestry-spring/src/test/java/org/example/testapp/pages/Start.java Mon Oct 17 22:30:56 2011
@@ -14,10 +14,8 @@
 
 package org.example.testapp.pages;
 
-import java.util.Arrays;
-
+import org.apache.tapestry5.annotations.Persist;
 import org.apache.tapestry5.annotations.Property;
-import org.apache.tapestry5.annotations.Retain;
 import org.apache.tapestry5.ioc.annotations.Inject;
 import org.apache.tapestry5.ioc.internal.util.InternalUtils;
 import org.example.testapp.services.SpringStatusProvider;
@@ -26,9 +24,12 @@ import org.example.testapp.services.Upca
 import org.example.testapp.services.ViaFactory;
 import org.springframework.context.ApplicationContext;
 
+import java.util.Arrays;
+import java.util.Locale;
+
 public class Start
 {
-    @Retain
+    @Persist
     private String input;
 
     // We're matching on type here, just as we would a service provided in a T5 IoC module.
@@ -45,11 +46,15 @@ public class Start
     @Inject
     @Property
     private ViaFactory viaFactory;
-    
+
     @Inject
     @Property
     private SymbolValueHolder symbolValueHolder;
 
+    @Property
+    @Inject
+    private Locale locale;
+
     void onSuccess()
     {
         input = upcaseBean.toUpperCase(input);

Modified: tapestry/tapestry5/trunk/tapestry-spring/src/test/webapp/Start.tml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-spring/src/test/webapp/Start.tml?rev=1185404&r1=1185403&r2=1185404&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-spring/src/test/webapp/Start.tml (original)
+++ tapestry/tapestry5/trunk/tapestry-spring/src/test/webapp/Start.tml Mon Oct 17 22:30:56 2011
@@ -22,7 +22,11 @@
             <dt>Via factory:</dt>
             <dd id="viaFactory">${viaFactory.message}</dd>
             <dt>Symbol Value Holder:</dt>
-            <dd id="symbolValueHolder">Start page is '${symbolValueHolder.value}', Value from Spring is '${symbolValueHolder.anotherValue}'</dd>
+            <dd id="symbolValueHolder">Start page is '${symbolValueHolder.value}', Value from Spring is
+                '${symbolValueHolder.anotherValue}'
+            </dd>
+            <dt>Page Locale:</dt>
+            <dd id="locale">${locale}</dd>
         </dl>
 
     </body>

Modified: tapestry/tapestry5/trunk/tapestry-spring/src/test/webapp/WEB-INF/applicationContext.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-spring/src/test/webapp/WEB-INF/applicationContext.xml?rev=1185404&r1=1185403&r2=1185404&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-spring/src/test/webapp/WEB-INF/applicationContext.xml (original)
+++ tapestry/tapestry5/trunk/tapestry-spring/src/test/webapp/WEB-INF/applicationContext.xml Mon Oct 17 22:30:56 2011
@@ -52,5 +52,11 @@
         </constructor-arg>
     </bean>
 
+    <bean id="TAP5-892" class="java.util.Locale">
+        <constructor-arg>
+            <value>ru</value>
+        </constructor-arg>
+    </bean>
+
 </beans>