RE: Validator Backend Issues

2003-11-24 Thread David Friedman
Joe,

When using a Struts Validator based on the Action name, you usually need to
add the 'method="validateSomeName"' because the Struts Validator wants to
use the exact name in your validation xml file.  In your case, that is
"/Login" which matches your action.  So, change your html:javascript and
html:form along these lines:





For more details see html:javascript and html:form in the Struts docs:
http://jakarta.apache.org/struts/userGuide/struts-html.html#javascript

Regards,
David

-Original Message-
From: Joe Hertz [mailto:[EMAIL PROTECTED]
Sent: Monday, November 24, 2003 2:37 AM
To: 'David Friedman'
Subject: RE: Validator Backend Issues


Don't laugh. Now I remember the problem I first encountered.

I'm getting a generated javascript function of "validate/Login(form)"

Do I have to escape the slash in the generated js function name or
something to call it?



> -Original Message-
> From: David Friedman [mailto:[EMAIL PROTECTED]
> Sent: Monday, November 24, 2003 2:03 AM
> To: Struts Users Mailing List; [EMAIL PROTECTED]
> Subject: RE: Validator Backend Issues
>
>
> Joe,
>
> Nope.  I was writing to you about that but you found your
> solution faster than I could type (my poor aching fingers at 2AM!).
>
> When you said your 'formName="UserLoginForm"', that suggests
> you're keying off the action's ActionForm name
> 'name='UserLoginForm' for your validation. That's why you
> would use DynaValidatorForm.
>
> Using DynaValidatorActionForm is just like a
> DynaValidatorForm with one
> exception: it validates of the name of the action.  So if
> your action is called /edit.do, it would need a form name of
> '/edit' such as: 
>   
>   ...
>   
> 
>
> I also got stuck on this when I first started using the
> Struts Validator.  I hope this explanation helps.
>
> Regards,
> David
>
> -Original Message-
> From: Joe Hertz [mailto:[EMAIL PROTECTED]
> Sent: Monday, November 24, 2003 2:07 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Validator Backend Issues
>
>
> Curious. Changing the ActionForm from a
> DynaValidatorActionForm to a DynaValidatorForm gets me
> backend validation.
>
> Have I just stumbled onto a bug?
>
> > -Original Message-
> > From: Joe Hertz [mailto:[EMAIL PROTECTED]
> > Sent: Monday, November 24, 2003 1:46 AM
> > To: 'Struts Users Mailing List'
> > Subject: Validator Backend Issues
> >
> >
> > I'm probably misunderstanding this woefully. Hope someone
> can set me
> > straight.
> >
> > For my login, I'm using a UserLoginForm class that extends
> > DynaValidatorActionForm. The Action  class is an extension of
> > DispatchAction (it handles all User related actions).
> >
> > If in my Login.jsp, I remove the  > formName="UserLoginForm"/> tag,I get no javascript validations
> > happening, which I would expect, but I also find that I *never* get
> > any back end validation checks happening. Nothing shows up
> where the
> >  tag was.
> >
> > Is there something I have to do to get the validator to do
> it's magic
> > outside of the client?
> >
> > -Joe
> >
> >
> >
> >
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Validator Backend Issues

2003-11-24 Thread Joe Hertz
David, 

Yes it does. Thank you.

I wanted to use the DynaActionValidatorForm (ow! Ow! Ow! :-) because I
do want it validated off of the Action, but when I saw the formName
property, I didn't want to "lie" to it on general principles.

Tx again.


> -Original Message-
> From: David Friedman [mailto:[EMAIL PROTECTED] 
> Sent: Monday, November 24, 2003 2:03 AM
> To: Struts Users Mailing List; [EMAIL PROTECTED]
> Subject: RE: Validator Backend Issues
> 
> 
> Joe,
> 
> Nope.  I was writing to you about that but you found your 
> solution faster than I could type (my poor aching fingers at 2AM!).
> 
> When you said your 'formName="UserLoginForm"', that suggests 
> you're keying off the action's ActionForm name 
> 'name='UserLoginForm' for your validation. That's why you 
> would use DynaValidatorForm.
> 
> Using DynaValidatorActionForm is just like a 
> DynaValidatorForm with one
> exception: it validates of the name of the action.  So if 
> your action is called /edit.do, it would need a form name of 
> '/edit' such as: 
>   
>   ...
>   
> 
> 
> I also got stuck on this when I first started using the 
> Struts Validator.  I hope this explanation helps.
> 
> Regards,
> David
> 
> -----Original Message-
> From: Joe Hertz [mailto:[EMAIL PROTECTED]
> Sent: Monday, November 24, 2003 2:07 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Validator Backend Issues
> 
> 
> Curious. Changing the ActionForm from a 
> DynaValidatorActionForm to a DynaValidatorForm gets me 
> backend validation.
> 
> Have I just stumbled onto a bug?
> 
> > -Original Message-
> > From: Joe Hertz [mailto:[EMAIL PROTECTED]
> > Sent: Monday, November 24, 2003 1:46 AM
> > To: 'Struts Users Mailing List'
> > Subject: Validator Backend Issues
> >
> >
> > I'm probably misunderstanding this woefully. Hope someone 
> can set me 
> > straight.
> >
> > For my login, I'm using a UserLoginForm class that extends 
> > DynaValidatorActionForm. The Action  class is an extension of 
> > DispatchAction (it handles all User related actions).
> >
> > If in my Login.jsp, I remove the  > formName="UserLoginForm"/> tag,I get no javascript validations 
> > happening, which I would expect, but I also find that I *never* get 
> > any back end validation checks happening. Nothing shows up 
> where the 
> >  tag was.
> >
> > Is there something I have to do to get the validator to do 
> it's magic 
> > outside of the client?
> >
> > -Joe
> >
> >
> >
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Validator Backend Issues

2003-11-24 Thread David Friedman
Joe,

Nope.  I was writing to you about that but you found your solution faster
than I could type (my poor aching fingers at 2AM!).

When you said your 'formName="UserLoginForm"', that suggests you're keying
off the action's ActionForm name 'name='UserLoginForm' for your validation.
That's why you would use DynaValidatorForm.

Using DynaValidatorActionForm is just like a DynaValidatorForm with one
exception: it validates of the name of the action.  So if your action is
called /edit.do, it would need a form name of '/edit' such as:


...



I also got stuck on this when I first started using the Struts Validator.  I
hope this explanation helps.

Regards,
David

-Original Message-
From: Joe Hertz [mailto:[EMAIL PROTECTED]
Sent: Monday, November 24, 2003 2:07 AM
To: 'Struts Users Mailing List'
Subject: RE: Validator Backend Issues


Curious. Changing the ActionForm from a DynaValidatorActionForm to a
DynaValidatorForm gets me backend validation.

Have I just stumbled onto a bug?

> -Original Message-
> From: Joe Hertz [mailto:[EMAIL PROTECTED]
> Sent: Monday, November 24, 2003 1:46 AM
> To: 'Struts Users Mailing List'
> Subject: Validator Backend Issues
>
>
> I'm probably misunderstanding this woefully. Hope someone can
> set me straight.
>
> For my login, I'm using a UserLoginForm class that extends
> DynaValidatorActionForm. The Action  class is an extension of
> DispatchAction (it handles all User related actions).
>
> If in my Login.jsp, I remove the  formName="UserLoginForm"/> tag,I get no javascript
> validations happening, which I would expect, but I also find
> that I *never* get any back end validation checks happening.
> Nothing shows up where the  tag was.
>
> Is there something I have to do to get the validator to do
> it's magic outside of the client?
>
> -Joe
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Validator Backend Issues

2003-11-23 Thread Joe Hertz
Curious. Changing the ActionForm from a DynaValidatorActionForm to a
DynaValidatorForm gets me backend validation.

Have I just stumbled onto a bug?

> -Original Message-
> From: Joe Hertz [mailto:[EMAIL PROTECTED] 
> Sent: Monday, November 24, 2003 1:46 AM
> To: 'Struts Users Mailing List'
> Subject: Validator Backend Issues
> 
> 
> I'm probably misunderstanding this woefully. Hope someone can 
> set me straight.
> 
> For my login, I'm using a UserLoginForm class that extends 
> DynaValidatorActionForm. The Action  class is an extension of 
> DispatchAction (it handles all User related actions).
> 
> If in my Login.jsp, I remove the  formName="UserLoginForm"/> tag,I get no javascript 
> validations happening, which I would expect, but I also find 
> that I *never* get any back end validation checks happening. 
> Nothing shows up where the  tag was.
> 
> Is there something I have to do to get the validator to do 
> it's magic outside of the client? 
> 
> -Joe
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Validator Backend Issues

2003-11-23 Thread Joe Hertz
I'm probably misunderstanding this woefully. Hope someone can set me
straight.

For my login, I'm using a UserLoginForm class that extends
DynaValidatorActionForm. The Action  class is an extension of
DispatchAction (it handles all User related actions).

If in my Login.jsp, I remove the  tag,I get no javascript validations
happening, which I would expect, but I also find that I *never* get any
back end validation checks happening. Nothing shows up where the
 tag was.

Is there something I have to do to get the validator to do it's magic
outside of the client? 

-Joe



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]