tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject svn commit: r709745 - /tapestry/tapestry5/trunk/src/site/apt/guide/beaneditform.apt
Date Sat, 01 Nov 2008 18:25:34 GMT
Author: hlship
Date: Sat Nov  1 11:25:34 2008
New Revision: 709745

URL: http://svn.apache.org/viewvc?rev=709745&view=rev
Log:
TAP5-131: BeanEditForm guide example about creating the FieldTranslator is inaccurate and
out of date

Modified:
    tapestry/tapestry5/trunk/src/site/apt/guide/beaneditform.apt

Modified: tapestry/tapestry5/trunk/src/site/apt/guide/beaneditform.apt
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/src/site/apt/guide/beaneditform.apt?rev=709745&r1=709744&r2=709745&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/src/site/apt/guide/beaneditform.apt (original)
+++ tapestry/tapestry5/trunk/src/site/apt/guide/beaneditform.apt Sat Nov  1 11:25:34 2008
@@ -203,15 +203,12 @@
     @Component(parameters =
     { "value=context.propertyValue", "label=prop:context.label",
             "translate=prop:currencyTranslator", "validate=prop:currencyValidator",
-            "clientId=prop:context.propertyId" })
+            "clientId=prop:context.propertyId", "annotationProvider=context" })
     private TextField currency;
 
     @Inject
     private ComponentResources resources;
 
-    @Inject
-    private FieldTranslatorSource fieldTranslatorSource;
-    
     public FieldValidator getCurrencyValidator()
     {
       return context.getValidator(currency);
@@ -219,10 +216,7 @@
     
     public FieldTranslator getCurrencyTranslator()
     {
-      Translator translator = ...;
-
-      return fieldTranslatorSource.createTranslator(currency, context.getPropertyId(), context.getContainerMessages(),
-        resources.getLocale(), context.getPropertyType(), context);
+      return context.getTranslator(current);
     }
 }
 +---+



Mime
View raw message