You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Lukasz Kucharski <lk...@gmail.com> on 2005/06/16 14:50:04 UTC

How to use validation in components

Hi.

How to implement validation in a form component that implements
IFormComponent so that it uses delegate and other validation objects
from the page it is contained with.

I have validation well implemented in one of the basePages of mine and
I would like to make new form component use it. Anybody know how to do
this?

Thanks

-- 
Pozdrawiam

Lukasz Kucharski
lkucharsNOSPAM@gmail.com
lkucharsNOSPAM@students.depaul.edu

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


Re: How to use validation in components

Posted by Ron Piterman <mp...@vollbio.de>.
Its open source - look at the code of ValidField, this should do...


ציטוט Lukasz Kucharski:
> Hi.
> 
> How to implement validation in a form component that implements
> IFormComponent so that it uses delegate and other validation objects
> from the page it is contained with.
> 
> I have validation well implemented in one of the basePages of mine and
> I would like to make new form component use it. Anybody know how to do
> this?
> 
> Thanks
> 


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


Re: How to use validation in components

Posted by Lukasz Kucharski <lk...@gmail.com>.
> 
> How to implement validation in a form component that implements
> IFormComponent so that it uses delegate and other validation objects
> from the page it is contained with.
> 
> I have validation well implemented in one of the basePages of mine and
> I would like to make new form component use it. Anybody know how to do
> this?

Ok so I finally found out about simple solution and document it here
for future generations. ;)

When creating components that participate in form submission and you
need validation mechanism out of the box use ValidatingTextField from
contrib library. It uses ValidationDelegate from the form it is
contained with.

I did not expect solution to be so simple. 

cheers

Łukasz