You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Sven Homburg <Sv...@hsofttec.com> on 2004/02/07 12:14:19 UTC

Validating the DatePicker-Input

Hi there,

can anybody tell me the best practice to validate the input from a
DatePicker-Component ?

Why has the DatePicker no validation slot like ValidField ?

--
With best regards

homburg Softwartechnik
S.Homburg
21220 Seevetal / GERMANY
Fon: +49-4105-669746
Fax: +49-4105-668947


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


RE: Validating the DatePicker-Input

Posted by Peter Butler <pe...@141.com>.
There are two approaches (as far as I can see).  The first is outlined
in "Tapestry in Action" section 5.7.  This involves validating the
component in the form listener method, telling the validation delegate
if there is an error (using delegate.setFormComponent and
delegate.record) and doing some manual decoration of the component in
the HTML template.

The second approach is to write a valid version of DatePicker.  I had to
do lots of date validation in a recent project so I found it easier to
do this.  My approach is a bit of a hack (in particular, having to copy
the .js and .script files was not nice) but it seems to work OK.  You
can download it from http://www.clever.co.nz/resources.html

Peter Butler

www.clever.co.nz

-----Original Message-----
From: Sven Homburg [mailto:Sven.Homburg@hsofttec.com] 
Sent: Sunday, 8 February 2004 12:14 a.m.
To: Tapestry users
Subject: Validating the DatePicker-Input



Hi there,

can anybody tell me the best practice to validate the input from a
DatePicker-Component ?

Why has the DatePicker no validation slot like ValidField ?

--
With best regards

homburg Softwartechnik
S.Homburg
21220 Seevetal / GERMANY
Fon: +49-4105-669746
Fax: +49-4105-668947


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



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