look at the wiki -> tapestry 4 -> howtows
there is a page on creating custom message source.
Cheers,
Ron
Mark wrote:
Hi guys,
I would like to use Springs ResourceBundleMessageSource instead of the
default MessageBinding for the localized messages.
The reason is that I need to define all those messages (properties) for
my Spring-Resourcebundle anyway, so I don't want to have to redefine
them for Tapestry and keep updating 2 files rather than 1.
So guess I need to overwrite the MessageBindingFactory?
I found a few things:
1. in tapestry.bindings.xml:
<service-point id="MessageBindingFactory" interface="BindingFactory">
<invoke-factory>
<construct class="MessageBindingFactory">
<set-object property="valueConverter"
value="infrastructure:valueConverter"/> </construct>
</invoke-factory>
</service-point>
2. in tapestry.coerce.xml:
<service-point id="ValueConverter" interface="ValueConverter">
<invoke-factory>
<construct class="ValueConverterImpl">
<set-configuration property="contributions"
configuration-id="TypeConverters"/>
</construct>
</invoke-factory>
</service-point>
<contribution configuration-id="tapestry.Infrastructure">
<property name="valueConverter" object="service:ValueConverter"/>
</contribution>
The question is now - how do I overwrite these settings, since both
files are included in the default tapestry.jar?
Also, should I overwrite/replace the MessageBindingFactory, the
MessageBinding or the ValueConverter class?
Or, much easier - can I just get Tapestry to read from the same
ResourceBundle file I use for Spring?
Thanks,
MARK
---------------------------------------------------------------------
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]