Wendy,
Validator has the concept of a "page number" - so your first tab could be
page 1, second tab page 2 etc etc.
On each tab's form specify a hidden tag with the page number:
<html:hidden name="myForm" property="page" value="1"/>
Then in your validation.xml, you specify the page number for each field:
<form name="..">
<field property="fund" page="1".....
<field property="function " page="1".....
<field property="costCenter" page="1".....
<field property="account" page="2".....
Obviously as you're using the DynaActionForm, you need to add 'page' as a
property to the form.
Niall
----- Original Message -----
From: "Wendy Smoak" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, March 05, 2004 6:23 PM
Subject: Validation help for same Form, multiple pages/tabs
I'm using the same [dynamic] ActionForm on all my pages. Which was just
*fine* until I wanted to use validation. :(
I need separate validation per "tab" which is essentially a <forward>
tag in struts-config.
I have a Struts-Menu "tab" that has fields for fund, function and cost
center, which are elements of an account, and I string the bits together
later.
Another tab has radio buttons where they pick an account.
On the first, I need all three fields to be required. But if I do that
in validation.xml, then the second page complains that the three fields
are required.
I understand what's happening, I just don't know the best way to fix it.
I'm using 1.2.0, if there's something new that might be of use.
I found this, advocating DynaValidatorActionForm
http://www.mail-archive.com/[EMAIL PROTECTED]/msg93220.html
But it seems to be controlled by the path, which is going to be the same
in both cases.
--
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management
---------------------------------------------------------------------
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]