Re: Making the Struts Validator work on the client side

2001-04-20 Thread David Winterfeldt


--- "Howk, Michael" <[EMAIL PROTECTED]> wrote:
> I've finally got David Winterfeldt's Struts
> Validator working on the server
> side, but it doesn't look like it's working on the
> client side. So I've got
> a couple of questions:
> 
> First, how can I be sure whether or not the
> validator is working on the
> client side? I'm assuming that, if the client side
> were working, my app
> wouldn't call the server side validator at all.
It would still call the server side, but you wouldn't
notice it because all the validation would have
already been done on the client.

> 
> Second, what am I missing? I've followed the example
> application (with the
> tweaks required to get it to work on my
> environment). So far, I've added the
> tag:
>  formName="user.servlet.UserEditForm" page="1"/>
> and the:
>  action="/user/servlet/handleusereditform.do"
> onsubmit="return
> validateUserEditForm(this);">
I auto-generate the Javascript method name so it would
actually create validateuser.servlet.UserEditForm for
the method name which isn't a legal method name.  I'll
make an optional attribute so you can specify the
method name.  It will be posted within an hour or two.
 The Javascript will also fail with nested properties
too.

> 
> The JSP runs fine, but it seems to skip over the
> client side validation. The
> only thing I can think of is that my onsubmit
> property doesn't quite match
> the formName property, because I need to put some of
> the package name in
> front of the class name (that's how I entered it for
> the logic:xxx tags).
> How do I know which function to use for the onsubmit
> property? Is that the
> problem or am I missing something else? Or do I need
> to setup the
> JavascriptValidatorTag somehow?
You can always look at the source sent to your browser
and see if it created the Javascript code where you
placed the JavascriptValidatorTag.  Then you can see
the name of the validation method that was generated.

> 
> Thank you,
> Michael Howk


__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/



RE: Making the Struts Validator work on the client side

2001-04-20 Thread Natra, Uday

Thanks Micheal.

-Original Message-
From: Howk, Michael [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 20, 2001 8:59 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Making the Struts Validator work on the client side


It's from the Validation Framework by David Winterfeldt and it's been
suggested several times on this mailing list for doing client-side and
server-side validation with struts (at least until version 1.1 comes out,
which is supposed to have some built-in validation support). You can find
the framework here:

http://home.earthlink.net/~dwinterfeldt/

It uses regular expressions in an XML file to validate your data. So far
I've only seen it work on the server-side, and I'm trying to figure out what
I'm doing wrong on the client-side. I hope this helps!

Michael

-Original Message-
From: Natra, Uday [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 20, 2001 8:50 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Making the Struts Validator work on the client side


Micheal,
Can U please tell me about the Validator Tag in struts? I don't seem to find
any tag of that kind in struts. 

Thanks,
Uday.

-Original Message-
From: Howk, Michael [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 20, 2001 8:39 AM
To: Struts Mailing List (E-mail)
Subject: Making the Struts Validator work on the client side


I've finally got David Winterfeldt's Struts Validator working on the server
side, but it doesn't look like it's working on the client side. So I've got
a couple of questions:

First, how can I be sure whether or not the validator is working on the
client side? I'm assuming that, if the client side were working, my app
wouldn't call the server side validator at all.

Second, what am I missing? I've followed the example application (with the
tweaks required to get it to work on my environment). So far, I've added the
tag:

and the:


The JSP runs fine, but it seems to skip over the client side validation. The
only thing I can think of is that my onsubmit property doesn't quite match
the formName property, because I need to put some of the package name in
front of the class name (that's how I entered it for the logic:xxx tags).
How do I know which function to use for the onsubmit property? Is that the
problem or am I missing something else? Or do I need to setup the
JavascriptValidatorTag somehow?

Thank you,
Michael Howk



RE: Making the Struts Validator work on the client side

2001-04-20 Thread Howk, Michael

It's from the Validation Framework by David Winterfeldt and it's been
suggested several times on this mailing list for doing client-side and
server-side validation with struts (at least until version 1.1 comes out,
which is supposed to have some built-in validation support). You can find
the framework here:

http://home.earthlink.net/~dwinterfeldt/

It uses regular expressions in an XML file to validate your data. So far
I've only seen it work on the server-side, and I'm trying to figure out what
I'm doing wrong on the client-side. I hope this helps!

Michael

-Original Message-
From: Natra, Uday [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 20, 2001 8:50 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Making the Struts Validator work on the client side


Micheal,
Can U please tell me about the Validator Tag in struts? I don't seem to find
any tag of that kind in struts. 

Thanks,
Uday.

-Original Message-
From: Howk, Michael [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 20, 2001 8:39 AM
To: Struts Mailing List (E-mail)
Subject: Making the Struts Validator work on the client side


I've finally got David Winterfeldt's Struts Validator working on the server
side, but it doesn't look like it's working on the client side. So I've got
a couple of questions:

First, how can I be sure whether or not the validator is working on the
client side? I'm assuming that, if the client side were working, my app
wouldn't call the server side validator at all.

Second, what am I missing? I've followed the example application (with the
tweaks required to get it to work on my environment). So far, I've added the
tag:

and the:


The JSP runs fine, but it seems to skip over the client side validation. The
only thing I can think of is that my onsubmit property doesn't quite match
the formName property, because I need to put some of the package name in
front of the class name (that's how I entered it for the logic:xxx tags).
How do I know which function to use for the onsubmit property? Is that the
problem or am I missing something else? Or do I need to setup the
JavascriptValidatorTag somehow?

Thank you,
Michael Howk



RE: Making the Struts Validator work on the client side

2001-04-20 Thread Natra, Uday

Micheal,
Can U please tell me about the Validator Tag in struts? I don't seem to find
any tag of that kind in struts. 

Thanks,
Uday.

-Original Message-
From: Howk, Michael [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 20, 2001 8:39 AM
To: Struts Mailing List (E-mail)
Subject: Making the Struts Validator work on the client side


I've finally got David Winterfeldt's Struts Validator working on the server
side, but it doesn't look like it's working on the client side. So I've got
a couple of questions:

First, how can I be sure whether or not the validator is working on the
client side? I'm assuming that, if the client side were working, my app
wouldn't call the server side validator at all.

Second, what am I missing? I've followed the example application (with the
tweaks required to get it to work on my environment). So far, I've added the
tag:

and the:


The JSP runs fine, but it seems to skip over the client side validation. The
only thing I can think of is that my onsubmit property doesn't quite match
the formName property, because I need to put some of the package name in
front of the class name (that's how I entered it for the logic:xxx tags).
How do I know which function to use for the onsubmit property? Is that the
problem or am I missing something else? Or do I need to setup the
JavascriptValidatorTag somehow?

Thank you,
Michael Howk