Multiple validation, one form

2003-09-17 Thread Ruben Carvalho
Sorry for sending this message again but I got no answer with the first one and I'm 
really getting crazy with it.
 
I'm getting a bit confused with the XML validation system. I have one form 
(DynaValidatorForm), 3 JSPs followed by 3 actions that do nothing. My Form has 3 
fields:
 
name, address and phone, all String
 
Now, I have 3 different JSPs, test1, test2 and test3.jsp, each of them followed by an 
Action like this:
test1.jsp -- Test1Action -- test2.jsp -- Test2Action -- test3.jsp -- Test3Action
 
All of the JSP have the same code. I want to validate: the first field after 
submitting the first page, the second field after submitting the second page and the 
3rd field after submitting the third page. My JSPs look like this:

(...)
html:hidden property=page value=MY_PROBLEM /
TABLE border=0
 TBODY
  TR
   THname/TH
   TDhtml:text property=name //TD
  /TR
  TR
   THaddress/TH
   TDhtml:text property=address //TD
  /TR
  TR
   THphone/TH
   TDhtml:text property=phone //TD
  /TR
  TR
   TDhtml:submit property=submit value=Submit //TD
   TDhtml:reset //TD
  /TR
 /TBODY
/TABLE
(...)

My validation.xml looks like this:
(...)
form name=testeForm
 field property=name depends=required page=0
  arg0 key=prompt.name /
 /field
 field property=address depends=required page=1
  arg0 key=prompt.address /
 /field
 field property=phone depends=required page=2
  arg0 key=prompt.phone /
 /field
/form
(...)
 
Which value should I write in my page property inside the JSPs?
 
if I put:
html:hidden property=page value=0 /
in my test1.jsp I get the error that Name is required. Great. But then I put
html:hidden property=page value=1 /
in my test2.jsp and when I submit I don't get any error. And I get the same when I 
submit the 3rd JSP.
 
Does anybody know how to use this page property correctly?
 
Thanks a lot
 
Rben Carvalho


Multiple validation, one form

2003-09-16 Thread Ruben Carvalho
Hi again,
 
I'm getting a bit confused with the XML validation system. I have one form 
(DynaValidatorForm), 3 JSPs followed by 3 actions that do nothing. My Form has 3 
fields:
 
name, address and phone, all String
 
Now, I have 3 different JSPs, test1, test2 and test3.jsp, each of them followed by an 
Action like this:
test1.jsp -- Test1Action -- test2.jsp -- Test2Action -- test3.jsp -- Test3Action
 
All of the JSP have the same code. I want to validate: the first field after 
submitting the first page, the second field after submitting the second page and the 
3rd field after submitting the third page. My JSPs look like this:

(...)
html:hidden property=page value=MY_PROBLEM /
TABLE border=0
 TBODY
  TR
   THname/TH
   TDhtml:text property=name //TD
  /TR
  TR
   THaddress/TH
   TDhtml:text property=address //TD
  /TR
  TR
   THphone/TH
   TDhtml:text property=phone //TD
  /TR
  TR
   TDhtml:submit property=submit value=Submit //TD
   TDhtml:reset //TD
  /TR
 /TBODY
/TABLE
(...)

My validation.xml looks like this:
(...)
form name=testeForm
 field property=name depends=required page=0
  arg0 key=prompt.name /
 /field
 field property=address depends=required page=1
  arg0 key=prompt.address /
 /field
 field property=phone depends=required page=2
  arg0 key=prompt.phone /
 /field
/form
(...)
 
Which value should I write in my page property inside the JSPs?
 
if I put:
html:hidden property=page value=0 /
in my test1.jsp I get the error that Name is required. Great. But then I put
html:hidden property=page value=1 /
in my test2.jsp and when I submit I don't get any error. And I get the same when I 
submit the 3rd JSP.
 
Does anybody know how to use this page property correctly?
 
Thanks a lot
 
Rben Carvalho
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]