blob: 0c649836b8796bcb2ab2b2a23df95a4b86a80666 [file] [log] [blame]
<?xml version="1.0"?>
<!--
Copyright 2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<module id="tapestry.form.translator" version="4.0.0" package="org.apache.tapestry.form.translator">
Support for input field translators.
<configuration-point id="Translators" schema-id="hivemind.lib.BeanFactoryContribution">
Defines the available translators that can be used to validate user input on fields.
</configuration-point>
<contribution configuration-id="Translators">
<bean name="date" class="DateTranslator"/>
<bean name="number" class="NumberTranslator"/>
<bean name="string" class="StringTranslator"/>
<bean name="bigdecimal" class="BigDecimalTranslator" />
</contribution>
<service-point id="TranslatorBeanFactory" interface="org.apache.hivemind.lib.BeanFactory">
<invoke-factory service-id="hivemind.lib.BeanFactoryBuilder">
<factory vend-class="Translator" configuration-id="Translators"/>
</invoke-factory>
</service-point>
<service-point id="TranslatorBindingFactory" interface="org.apache.tapestry.binding.BindingFactory">
Factory for the "translator:" binding prefix.
<invoke-factory>
<construct class="TranslatorBindingFactory">
<set-service property="translatorBeanFactory" service-id="TranslatorBeanFactory"/>
<set-object property="valueConverter" value="infrastructure:valueConverter"/>
</construct>
</invoke-factory>
</service-point>
<contribution configuration-id="tapestry.bindings.BindingFactories">
<binding prefix="translator" service-id="TranslatorBindingFactory"/>
</contribution>
</module>