You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2010/05/12 00:50:33 UTC

svn commit: r943320 - /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/services/AppModule.java

Author: hlship
Date: Tue May 11 22:50:33 2010
New Revision: 943320

URL: http://svn.apache.org/viewvc?rev=943320&view=rev
Log:
TAP5-424: Use TypeCoercer implicitly, not explicitly, to provide the Resource contributed to the ComponentMessagesSource service

Modified:
    tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/services/AppModule.java

Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/services/AppModule.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/services/AppModule.java?rev=943320&r1=943319&r2=943320&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/services/AppModule.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/services/AppModule.java Tue May 11 22:50:33 2010
@@ -36,9 +36,10 @@ import org.apache.tapestry5.ioc.MappedCo
 import org.apache.tapestry5.ioc.OrderedConfiguration;
 import org.apache.tapestry5.ioc.Resource;
 import org.apache.tapestry5.ioc.ServiceBinder;
+import org.apache.tapestry5.ioc.annotations.Inject;
 import org.apache.tapestry5.ioc.annotations.Marker;
+import org.apache.tapestry5.ioc.annotations.Value;
 import org.apache.tapestry5.ioc.internal.util.CollectionFactory;
-import org.apache.tapestry5.ioc.services.TypeCoercer;
 import org.apache.tapestry5.services.AliasContribution;
 import org.apache.tapestry5.services.BaseURLSource;
 import org.apache.tapestry5.services.ComponentClassTransformWorker;
@@ -274,10 +275,10 @@ public class AppModule
         configuration.add("ReverseStringsWorker", new ReverseStringsWorker());
     }
 
-    public static void contributeComponentMessagesSource(TypeCoercer coercer,
-            OrderedConfiguration<Resource> configuration)
+    public static void contributeComponentMessagesSource(@Inject
+    @Value("context:WEB-INF/pre-app.properties")
+    Resource preappResource, OrderedConfiguration<Resource> configuration)
     {
-        configuration.add("PreApp", coercer.coerce("context:WEB-INF/pre-app.properties", Resource.class),
-                "before:AppCatalog");
+        configuration.add("PreApp", preappResource, "before:AppCatalog");
     }
 }