ah that's better :)

and i now have arithmetic support in my text fields .. jeez shunting-yard/rpn/infix/postfix blah blah is a pain and now that i have a method that works i hope i never have to look at it all again!!!

p.

On 11/01/2011 9:15 AM, Josh Canfield wrote:
Have you tried :

configuration.override(BigDecimal.class, new BigDecimalTranslator());

Josh

On Mon, Jan 10, 2011 at 2:01 PM, Paul Stanton<[email protected]>  wrote:
can someone shed some light on how to override or supply new translators to
tapestry 5.2+ ?

jumpstart is written for 5.1
http://jumpstart.doublenegative.com.au/jumpstart/examples/input/creatingtranslators1

and no longer works.

i've tried adding:

    public static void
contributeTranslatorSource(MappedConfiguration<Class<?>, Translator<?>>
configuration)
    {
        configuration.add(BigDecimal.class, new BigDecimalTranslator());
    }

to AppModule, but i get:

Caused by: java.lang.IllegalArgumentException: Service contribution (to
service 'TranslatorSource') conflicts with existing contribution (by
package.AppModule.contributeTranslatorSource(MappedConfiguration) (at
AppModule.java)).
    at
org.apache.tapestry5.ioc.internal.ValidatingMappedConfigurationWrapper.add(ValidatingMappedConfigurationWrapper.java:83)
    at
org.apache.tapestry5.services.TapestryModule.contributeTranslatorSource(TapestryModule.java:1044)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to