Or, we can have dojo correct their logic. I'm for dojo handling array/single
objects more generically. I will bring it up with them tomorrow, I'm sure a
fix can be had soon either way. (I've heard rumors but can't say...I'm
biting my tongue =) )
It'll be fixed by tomorrow in whatever form it comes in.(Don't forget to
update your maven2 pom dependency to 4.1.1-SNAPSHOT, I'll be updating the
site docs to reflect this as well.)
On 7/31/06, Jun Tsai <[EMAIL PROTECTED]> wrote:
When one requried validator,tapestry produce
tapestry.form.registerProfile
('AForm',{"required":"nameField","nameField":{"required":"请输入[NAME]的内容。"}});
When two or more requried validator,tapestry produce
tapestry.form.registerProfile
('AForm',{"required":["nameField","passwordField"],"nameField":{"required":"请输入[NAME]的内容。"},"passwordField":{"required":"请输入[NUM]的内容。"}});
When one required validator, tapestry should produce
tapestry.form.registerProfile
('AForm',{"required":["nameField"],"nameField":{"required":"请输入[NAME]的内容。"}});
Jun Tsai
2006/7/31, Jun Tsai <[EMAIL PROTECTED]>:
>
> In the dojo.validate.check
>
> if ( profile.required instanceof Array ) {
>
> When only one required validator,profile.required is object.
>
> Jun Tsai
>
> 2006/7/31, Jun Tsai < [EMAIL PROTECTED]>:
>
> > When in a form ,only one required validator.the dojo dialog can't be
> > shown.
> >
> > ex:
> > <?xml version="1.0" encoding="utf-8"?>
> > <!DOCTYPE page-specification PUBLIC "-//Apache Software
> > Foundation//Tapestry Specification 4.0//EN" "
> > http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">
> >
> > <page-specification class="corner.orm.tapestry.page.PoFormPage ">
> > <description>corner.demo.model.one.A Form Page</description>
> > <bean class="org.apache.tapestry.valid.ValidationDelegate"
> > name="delegate"/>
> > <property persist="entity" initial-value="new
corner.demo.model.one.A()"
> > name="entity"/>
> > <component type="Form" id="AForm">
> > <binding value="ognl:beans.delegate" name="delegate"/>
> > <binding value="ognl:true" name="clientValidationEnabled"/>
> > <binding value="listener:doSaveEntityAction" name="success"/>
> > <binding value="listener:doCancelEntityAction" name="cancel"/>
> > </component>
> > <component type="TextField" id="nameField">
> > <binding value="message:name" name="displayName"/>
> > <binding value="translator:string" name="translator"/>
> > <binding value="ognl: entity.name" name="value"/>
> > <binding name="validators" value="validators:required"/>
> > </component>
> > <component type="TextField" id="passwordField">
> > <binding value="message:password" name="displayName"/>
> > <binding value="translator:string" name="translator"/>
> > <binding value="ognl:entity.password " name="value"/>
> > </component>
> > </page-specification>
> >
> >
> > Jun Tsai
> >
> > --
> > Welcome to China Java Users Group(CNJUG).
> > http://cnjug.dev.java.net
> >
>
>
>
> --
> Welcome to China Java Users Group(CNJUG).
> http://cnjug.dev.java.net
>
--
Welcome to China Java Users Group(CNJUG).
http://cnjug.dev.java.net
--
Jesse Kuhnert
Tacos/Tapestry, team member/developer
Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.