ImagoX Forms is a good candidate for the Launcher mechanism, otherwise it must create a new instance of the field validators on each request. The configurations passed to the ImagoForm class must list the input types and classes that will validate those types. The types listed in the configuration file become valid xform:type attribute values for the xform:input elements. Thus both init.Launcher.init.Forms.email=org.xenei.imagoX.forms.EmailValidator and org.xenei.imagoX.forms.ImagoForm.email=org.xenei.imagoX.forms.EmailValidator define xform:email as a valid type for the xform:input element (e.g. <xform:input xform:name="email" xform:type="email"/> is a valid element) The Forms configuration information is added to the imago.properties file. The method of configuring Forms depends upon the choice of configuration style. The two styles are shown below. Launcher-style configurationinit.Launcher.class.Forms=org.xenei.imagoX.forms.ImagoForm init.Launcher.init.Forms.number=org.xenei.imagoX.forms.NumberValidator init.Launcher.init.Forms.date=org.xenei.imagoX.forms.DateValidator init.Launcher.init.Forms.image=org.xenei.imagoX.forms.ImageValidator init.Launcher.init.Forms.email=org.xenei.imagoX.forms.EmailValidator init.Launcher.init.Forms.choice=org.xenei.imagoX.forms.ChoiceValidator init.Launcher.init.Forms.select=org.xenei.imagoX.forms.SelectValidator imago.properties-style configurationorg.xenei.imagoX.forms.ImagoForm.number=org.xenei.imagoX.forms.NumberValidator org.xenei.imagoX.forms.ImagoForm.date=org.xenei.imagoX.forms..DateValidator org.xenei.imagoX.forms.ImagoForm.image=org.xenei.imagoX.forms.ImageValidator org.xenei.imagoX.forms.ImagoForm.email=org.xenei.imagoX.forms.EmailValidator org.xenei.imagoX.forms.ImagoForm.choice=org.xenei.imagoX.forms.ChoiceValidator org.xenei.imagoX.forms.ImagoForm.select=org.xenei.imagoX.forms.SelectValidator All trademarks and copyrights are the property of their respective owners.
Copyright © 2002-2004 by Xenei.com, All Rights Reserved
|