[
https://issues.apache.org/jira/browse/TAPESTRY-2580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12625953#action_12625953
]
Howard M. Lewis Ship commented on TAPESTRY-2580:
------------------------------------------------
I've been thinking of changing the MappedConfiguration interface to add a new
method, override() that's used to override built-ins. That would address this
particular situation and many more like it, removing an occasional idiom of the
override-configuration-holding service.
> Allow override default translator
> ---------------------------------
>
> Key: TAPESTRY-2580
> URL: https://issues.apache.org/jira/browse/TAPESTRY-2580
> Project: Tapestry
> Issue Type: Improvement
> Components: tapestry-core
> Affects Versions: 5.0.14
> Environment: All
> Reporter: Ernest Monklitch
> Fix For: 5.0.15
>
>
> Tapestry should allow developer to override shipped default translators and
> add new ones. This should be done by allowing the configuration of the
> translator source, so that developers are not forced to use the translator
> tag on every field. :)
> If you try to:
> public void contributeTranslatorSource(MappedConfiguration<String,
> Translator> configuration)
> {
> configuration.add("double", new LocalizedDoubleTranslator());
> }
> It results in:
> [WARN] TapestryModule.TranslatorSource Service contribution (to service
> 'TranslatorSource', by
> fi.abo.eblanketter.tapestry5.services.AppModule.contributeTranslatorSource(MappedConfiguration)
> (at AppModule.java:224)) conflicts with existing contribution (by
> org.apache.tapestry5.services.TapestryModule.contributeTranslatorSource(MappedConfiguration)
> (at TapestryModule.java:609)) and has been ignored.
> Is it possible to assign alias to this translator to override it?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]