You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Peter Beshai <pb...@hotmail.com> on 2006/09/28 21:31:03 UTC

4.1 Form Validation: look at two fields at once?

Is it possible to make a validator that can compare the values of two form 
components at the same time? I have an Upload component for uploading files 
directly and a TextField component for uploading files from a URL. The user 
is supposed to fill in only one of the fields. I would like to have a 
validator that checks if both fields are empty, or if both are full, but I 
don't know how to pass both fields' values to the validator.

Is this kind of validation better done in the form's submit listener? If so, 
is there a way to use client-side validation as well (to create dialogs as 
shown in the TimeTracker example)? Is this where a validation delegate would 
be used?


Thanks!
Peter Beshai

_________________________________________________________________
Achetez ce que vous voulez, quand vous voulez sur Sympatico / MSN Magasiner 
http://magasiner.sympatico.msn.ca/content/shp/?ctId=101,ptnrid=176,ptnrdata=081805


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: 4.1 Form Validation: look at two fields at once?

Posted by andyhot <an...@di.uoa.gr>.
Yea, i also want to add
https://svn.sourceforge.net/svnroot/tacos/tacos-4.0/trunk/tacos-core/src/java/net/sf/tacos/form/validator/FileTypeValidator.java
and
http://issues.apache.org/jira/browse/TAPESTRY-817 - Translator for
BigDecimal values



Jesse Kuhnert wrote:
> FYI I'll be adding this feature in during my next "big push". (Or
> something
> like it at least)
>
> On 9/28/06, andyhot <an...@di.uoa.gr> wrote:
>>
>> here's an example
>> http://issues.apache.org/jira/browse/TAPESTRY-410
>>
>> Peter Beshai wrote:
>> > Is it possible to make a validator that can compare the values of two
>> > form components at the same time? I have an Upload component for
>> > uploading files directly and a TextField component for uploading files
>> > from a URL. The user is supposed to fill in only one of the fields. I
>> > would like to have a validator that checks if both fields are empty,
>> > or if both are full, but I don't know how to pass both fields' values
>> > to the validator.
>> >
>> > Is this kind of validation better done in the form's submit listener?
>> > If so, is there a way to use client-side validation as well (to create
>> > dialogs as shown in the TimeTracker example)? Is this where a
>> > validation delegate would be used?
>> >
>> >
>> > Thanks!
>> > Peter Beshai
>> >
>> > _________________________________________________________________
>> > Achetez ce que vous voulez, quand vous voulez sur Sympatico / MSN
>> > Magasiner
>> >
>> http://magasiner.sympatico.msn.ca/content/shp/?ctId=101,ptnrid=176,ptnrdata=081805
>>
>> >
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> > For additional commands, e-mail: users-help@tapestry.apache.org
>> >
>> >
>>
>>
>> -- 
>> Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
>> Tapestry / Tacos developer
>> Open Source / J2EE Consulting
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>


-- 
Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: 4.1 Form Validation: look at two fields at once?

Posted by Jesse Kuhnert <jk...@gmail.com>.
FYI I'll be adding this feature in during my next "big push". (Or something
like it at least)

On 9/28/06, andyhot <an...@di.uoa.gr> wrote:
>
> here's an example
> http://issues.apache.org/jira/browse/TAPESTRY-410
>
> Peter Beshai wrote:
> > Is it possible to make a validator that can compare the values of two
> > form components at the same time? I have an Upload component for
> > uploading files directly and a TextField component for uploading files
> > from a URL. The user is supposed to fill in only one of the fields. I
> > would like to have a validator that checks if both fields are empty,
> > or if both are full, but I don't know how to pass both fields' values
> > to the validator.
> >
> > Is this kind of validation better done in the form's submit listener?
> > If so, is there a way to use client-side validation as well (to create
> > dialogs as shown in the TimeTracker example)? Is this where a
> > validation delegate would be used?
> >
> >
> > Thanks!
> > Peter Beshai
> >
> > _________________________________________________________________
> > Achetez ce que vous voulez, quand vous voulez sur Sympatico / MSN
> > Magasiner
> >
> http://magasiner.sympatico.msn.ca/content/shp/?ctId=101,ptnrid=176,ptnrdata=081805
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> --
> Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
> Tapestry / Tacos developer
> Open Source / J2EE Consulting
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

Re: 4.1 Form Validation: look at two fields at once?

Posted by andyhot <an...@di.uoa.gr>.
here's an example
http://issues.apache.org/jira/browse/TAPESTRY-410

Peter Beshai wrote:
> Is it possible to make a validator that can compare the values of two
> form components at the same time? I have an Upload component for
> uploading files directly and a TextField component for uploading files
> from a URL. The user is supposed to fill in only one of the fields. I
> would like to have a validator that checks if both fields are empty,
> or if both are full, but I don't know how to pass both fields' values
> to the validator.
>
> Is this kind of validation better done in the form's submit listener?
> If so, is there a way to use client-side validation as well (to create
> dialogs as shown in the TimeTracker example)? Is this where a
> validation delegate would be used?
>
>
> Thanks!
> Peter Beshai
>
> _________________________________________________________________
> Achetez ce que vous voulez, quand vous voulez sur Sympatico / MSN
> Magasiner
> http://magasiner.sympatico.msn.ca/content/shp/?ctId=101,ptnrid=176,ptnrdata=081805
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org