Scott Purcell wrote:

I dug myself into a corner last night and cannot assemble a viable solution.

I created a bean (usercheckout) which holds two nested beans (Shipping), and (Billing). 
Basically I have the user fill out a shipping form, then they fill out a Billing form. 
The problem is, when I am trying to validate the data, since both are called 
"usercheckout" I can either validate one but not the other. In my 
validation.xml I have this:

   <form name="usercheckout">
     <field property="billingBean.firstName" depends="required,minlength">
       <arg key="account.firstname.displayname" />
<!-- cut -->
And that validates all the nested Billing bean properties. But now when I go to the 
shipping page, I do not know where to validate those because its name is 
"usercheckout".

If I add another field to the above form, then it appears to be looking for two 
names, etc.

Does this make sense?

If anyone has ideas, please let me know,
As Michael says, you'll want to use the action mappings as the keys in the validation file. Using Dyna beans I use DynaValidatorActionForm rather than DynaValidatorForm, so in my validation config file I can use the same beans in different actions with different validation rules.

A quick scan of the JavaDocs reveals that if you are hand-coding your beans there is a similar hierarchy on the non-dynamic side of things.

Dave



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

Reply via email to