You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Joseph Jegan <jo...@hathway.com> on 2004/02/07 07:18:46 UTC

Problem in Multipage Validation with DynaValidatorForm

Hello,

My application has two page form (wizard type).  To make the programming and maintenance simpler, I have selected Validator along with DynaValidatorForm.

The problem which i am facing is that, my first page validation works correctly. But, second page doesnt seems to work. It doesnt go in to the validation method itself.
For the fields in the first page, i have give page attribute for the Field element to be "0" and for the second page fields i have given "1". I am suspecting the problem could be with the "page" parameter in the DynaValidatorForm. How does the page parameter in the form gets incremented.. Does it happen automatically?
Can someone tell me the exact steps to implement a multipage validation with DynaValidatorForm?

Thanks in Advance
Joseph



RE: Problem in Multipage Validation with DynaValidatorForm

Posted by David Friedman <hu...@ix.netcom.com>.
Joseph, here are some different questions for you:

1. Is your problem with client- or server-side validation?

I'll assume (for discussion purposes) that client-side multi-page validation
with an Action is your problem:

Does your appropriate JSP page have
<html:hidden property="page" value="1" /> (or 2 or 3)
(For the validation page set you wish to validate)

Does your JSP have hidden variables (or a session-based bean) to hold/retain
the other fields you've passed along?

AND, for client-side validation:
<html:javascript formName="/submit2" method="validateSubmit" page="1" /> (or
2 or 3)

If you are client-side validating based upon an Action, you'll need to
rename the action since validation will try to use the slash starting the
action name in the javascript function name and slashes are invalid function
name characters in Javascript.  So, use html:javascript's
formName="/someAction" and method="validateSomeNewName" to fix that problem.
Just be sure to change the html:form to use an
onsubmit="validateSomeNewName" so everything is consistent enough to run.

Regards,
David

-----Original Message-----
From: Matthias Wessendorf [mailto:mailings@matthias-wessendorf.de]
Sent: Sunday, February 08, 2004 9:20 AM
To: 'Struts Users Mailing List'
Subject: RE: Problem in Multipage Validation with DynaValidatorForm


could you explain some details ?

cheers!

-----Original Message-----
From: Joseph Jegan [mailto:josephjegan@hathway.com]
Sent: Saturday, February 07, 2004 8:08 PM
To: Struts Users Mailing List
Subject: Re: Problem in Multipage Validation with DynaValidatorForm


Thanks matthias for your response.

Still, it is not working for me...



----- Original Message -----
From: "Matthias Wessendorf" <ma...@matthias-wessendorf.de>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
Sent: Saturday, February 07, 2004 4:19 PM
Subject: RE: Problem in Multipage Validation with DynaValidatorForm


> hi joseph
>
> you should use "DynaValidatorActionForm" in <form-bean>-declaration
>
> in your validator.xml you enter instead of the name (myNiceFormBean)
> the path (/submit1 or /submit2) und on field you deal as well, which
> is required in page1 or page2
>
> greeting,
>
> matthias
>
> -----Original Message-----
> From: Joseph Jegan [mailto:josephjegan@hathway.com]
> Sent: Saturday, February 07, 2004 7:19 AM
> To: Struts Users Mailing List
> Subject: Problem in Multipage Validation with DynaValidatorForm
>
>
> Hello,
>
> My application has two page form (wizard type).  To make the
> programming and maintenance simpler, I have selected Validator along
> with DynaValidatorForm.
>
> The problem which i am facing is that, my first page validation works
> correctly. But, second page doesnt seems to work. It doesnt go in to
> the validation method itself. For the fields in the first page, i have

> give page attribute for the Field element to be "0" and for the second

> page fields i have given "1". I am suspecting the problem could be
> with the "page" parameter in the DynaValidatorForm. How does the page
> parameter in the form gets incremented.. Does it happen automatically?

> Can someone tell me the exact steps to implement a multipage
> validation with DynaValidatorForm?
>
> Thanks in Advance
> Joseph
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>



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


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


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


RE: Problem in Multipage Validation with DynaValidatorForm

Posted by Matthias Wessendorf <ma...@matthias-wessendorf.de>.
could you explain some details ?

cheers!

-----Original Message-----
From: Joseph Jegan [mailto:josephjegan@hathway.com] 
Sent: Saturday, February 07, 2004 8:08 PM
To: Struts Users Mailing List
Subject: Re: Problem in Multipage Validation with DynaValidatorForm


Thanks matthias for your response.

Still, it is not working for me... 



----- Original Message ----- 
From: "Matthias Wessendorf" <ma...@matthias-wessendorf.de>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
Sent: Saturday, February 07, 2004 4:19 PM
Subject: RE: Problem in Multipage Validation with DynaValidatorForm


> hi joseph
> 
> you should use "DynaValidatorActionForm" in <form-bean>-declaration
> 
> in your validator.xml you enter instead of the name (myNiceFormBean) 
> the path (/submit1 or /submit2) und on field you deal as well, which 
> is required in page1 or page2
> 
> greeting,
> 
> matthias
> 
> -----Original Message-----
> From: Joseph Jegan [mailto:josephjegan@hathway.com]
> Sent: Saturday, February 07, 2004 7:19 AM
> To: Struts Users Mailing List
> Subject: Problem in Multipage Validation with DynaValidatorForm
> 
> 
> Hello,
> 
> My application has two page form (wizard type).  To make the 
> programming and maintenance simpler, I have selected Validator along 
> with DynaValidatorForm.
> 
> The problem which i am facing is that, my first page validation works 
> correctly. But, second page doesnt seems to work. It doesnt go in to 
> the validation method itself. For the fields in the first page, i have

> give page attribute for the Field element to be "0" and for the second

> page fields i have given "1". I am suspecting the problem could be 
> with the "page" parameter in the DynaValidatorForm. How does the page 
> parameter in the form gets incremented.. Does it happen automatically?

> Can someone tell me the exact steps to implement a multipage 
> validation with DynaValidatorForm?
> 
> Thanks in Advance
> Joseph
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 
> 



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


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


Re: Problem in Multipage Validation with DynaValidatorForm

Posted by Nafise Dianatizade <n_...@yahoo.com>.
Joseph,
let us see your source code 
 
Nafise


---------------------------------
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online

Re: Problem in Multipage Validation with DynaValidatorForm

Posted by Joseph Jegan <jo...@hathway.com>.
Thanks matthias for your response.

Still, it is not working for me... 



----- Original Message ----- 
From: "Matthias Wessendorf" <ma...@matthias-wessendorf.de>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
Sent: Saturday, February 07, 2004 4:19 PM
Subject: RE: Problem in Multipage Validation with DynaValidatorForm


> hi joseph
> 
> you should use "DynaValidatorActionForm" in <form-bean>-declaration
> 
> in your validator.xml you enter instead of the name (myNiceFormBean)
> the path (/submit1 or /submit2)
> und on field you deal as well, which is required in page1 or page2
> 
> greeting,
> 
> matthias
> 
> -----Original Message-----
> From: Joseph Jegan [mailto:josephjegan@hathway.com] 
> Sent: Saturday, February 07, 2004 7:19 AM
> To: Struts Users Mailing List
> Subject: Problem in Multipage Validation with DynaValidatorForm
> 
> 
> Hello,
> 
> My application has two page form (wizard type).  To make the programming
> and maintenance simpler, I have selected Validator along with
> DynaValidatorForm.
> 
> The problem which i am facing is that, my first page validation works
> correctly. But, second page doesnt seems to work. It doesnt go in to the
> validation method itself. For the fields in the first page, i have give
> page attribute for the Field element to be "0" and for the second page
> fields i have given "1". I am suspecting the problem could be with the
> "page" parameter in the DynaValidatorForm. How does the page parameter
> in the form gets incremented.. Does it happen automatically? Can someone
> tell me the exact steps to implement a multipage validation with
> DynaValidatorForm?
> 
> Thanks in Advance
> Joseph
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 
> 



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


RE: Problem in Multipage Validation with DynaValidatorForm

Posted by Matthias Wessendorf <ma...@matthias-wessendorf.de>.
hi joseph

you should use "DynaValidatorActionForm" in <form-bean>-declaration

in your validator.xml you enter instead of the name (myNiceFormBean)
the path (/submit1 or /submit2)
und on field you deal as well, which is required in page1 or page2

greeting,

matthias

-----Original Message-----
From: Joseph Jegan [mailto:josephjegan@hathway.com] 
Sent: Saturday, February 07, 2004 7:19 AM
To: Struts Users Mailing List
Subject: Problem in Multipage Validation with DynaValidatorForm


Hello,

My application has two page form (wizard type).  To make the programming
and maintenance simpler, I have selected Validator along with
DynaValidatorForm.

The problem which i am facing is that, my first page validation works
correctly. But, second page doesnt seems to work. It doesnt go in to the
validation method itself. For the fields in the first page, i have give
page attribute for the Field element to be "0" and for the second page
fields i have given "1". I am suspecting the problem could be with the
"page" parameter in the DynaValidatorForm. How does the page parameter
in the form gets incremented.. Does it happen automatically? Can someone
tell me the exact steps to implement a multipage validation with
DynaValidatorForm?

Thanks in Advance
Joseph




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