You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Michal Prinke <bo...@icpnet.pl> on 2004/05/13 01:31:08 UTC
Connecting validators to components other than @ValidField ?
Hello,
I'd like to connect DateValidator to my @DatePicker
and StringValidator to my @TextArea. Is there an easy to achieve it?
Too bad only @ValidField has validator="" attribute...
Client-side validation for @TextArea and @DatePicker
would be very nice...
Thank you!
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: ValidTextArea and ValidDatePicker not working?
Posted by Galen Meurer <si...@galenmeurer.com>.
I'm not sure if you mean 3.1 (compiling from CVS?) or 3.0, but when we
upgraded from RC3 to 3.0 Release we got the same error message about the
default icon. I did pretty much exactly what you did -- in the
ValidDatePicker.jwc I added an icon parameter and a context-asset for an
icon.
As for the next error, did you copy the DatePicker.js and scripts to your
WEB-INF (as Peter mentioned in his post)? You can keep from having to
duplicate the DatePicker.js in your WEB-INF, by adding (to
ValidDatePicker.jwc):
<private-asset name="script"
resource-path="/org/apache/tapestry/form/DatePicker.js"/>
I did not figure out how to avoid duplicating the DatePicker.script in our
WEB-INF, but Tapestry scripts are still unexplored territory for me.
BTW, to see if I could get the same error as you, I removed the
DatePicker.script from our WEB-INF, but I didn't get the same error message.
I'd try putting a copy in WEB-INF all the same.
Best,
Galen;
----- Original Message -----
From: "Michal Prinke" <bo...@icpnet.pl>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Wednesday, May 12, 2004 5:48 PM
Subject: ValidTextArea and ValidDatePicker not working?
> Galen Meurer wrote:
> > We're successfully using a valid DatePicker that Peter Butler
> > sent to this list (http://www.clever.co.nz/resources.html).
>
> I've downloaded those components but just can't get them working...
[...]
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
ValidTextArea and ValidDatePicker not working?
Posted by Michal Prinke <bo...@icpnet.pl>.
Galen Meurer wrote:
> We're successfully using a valid DatePicker that Peter Butler
> sent to this list (http://www.clever.co.nz/resources.html).
I've downloaded those components but just can't get them working...
I have the newest Tapestry - 3.1. I prepared some quick form to test
them - with @Body, @Form, @ValidTextArea (+ StringValidator) and
@ValidDatePicker (+ DateValidator).
First, I got the following error:
> Method 'public abstract org.apache.tapestry.IAsset
> org.apache.tapestry.form.DatePicker.getIcon()' (declared in class
> org.apache.tapestry.form.DatePicker) has no implementation in class
> nz.co.clever.components.valid.ValidDatePicker (or enhanced subclass
> nz.co.clever.components.valid.ValidDatePicker$Enhance_6).
So I added the following line to ValidDatePicker.jwc:
> <parameter name="icon" type="org.apache.tapestry.IAsset"
> direction="in" required="no"
> default-value="assets.defaultIcon"/>
Now I'm getting such an error:
> Script symbol 'field' is
nz.co.clever.components.valid.ValidDatePicker$Enhance_9,
> not org.apache.tapestry.valid.ValidField
> location: classpath:/org/apache/tapestry/valid/DateValidator.script,
> line 22, column 88
...or similar one for ValidTextArea.
What am I doing wrong?
Or maybe those components work only with older version of Tapestry?
Thank you!
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Connecting validators to components other than @ValidField ?
Posted by Galen Meurer <si...@galenmeurer.com>.
We're successfully using a valid DatePicker that Peter Butler sent to this
list.
http://www.caddr.com/macho/archives/tapestry-users/2004-2/3898.html
or
http://article.gmane.org/gmane.comp.java.tapestry.user/6504/match=+http++www+clever+resources+html
I see on his site (http://www.clever.co.nz/resources.html) that he's also
got a valid TextArea (haven't tried that one).
Galen;
----- Original Message -----
From: "Michal Prinke" <bo...@icpnet.pl>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Wednesday, May 12, 2004 4:31 PM
Subject: Connecting validators to components other than @ValidField ?
> Hello,
>
> I'd like to connect DateValidator to my @DatePicker
> and StringValidator to my @TextArea. Is there an easy to achieve it?
>
> Too bad only @ValidField has validator="" attribute...
> Client-side validation for @TextArea and @DatePicker
> would be very nice...
>
> Thank you!
>
> ---------------------------------------------------------------------
> 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
Re: Connecting validators to components other than @ValidField ?
Posted by Jamie Orchard-Hays <ja...@dang.com>.
I've written a custom DatePicker and DateValidator to work with it. If
you're interested, I can send the code from work tomorrow. Basically,
if you use the custom DateValidator with the custom DatePicker, the
validator's format(s) (mine takes multiple formats) override the
DatePicker's format(s).
Jamie O-H
On May 12, 2004, at 7:31 PM, Michal Prinke wrote:
> Hello,
>
> I'd like to connect DateValidator to my @DatePicker
> and StringValidator to my @TextArea. Is there an easy to achieve it?
>
> Too bad only @ValidField has validator="" attribute...
> Client-side validation for @TextArea and @DatePicker
> would be very nice...
>
> Thank you!
>
> ---------------------------------------------------------------------
> 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