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,

Thanks,
Scott




<action path="/ValidateBillingInfo"
    type="com.mb.purcell.action.checkout.ValidateBillingInfo"
    name="usercheckout"
    input="/jsp/checkout/DisplayBillingForm.jsp"
    validate="true">
    <forward name="ShippingForm" path="/jsp/checkout/DisplayShippingForm.jsp" />
    <forward name="AddressForm" path="/jsp/checkout/DisplayAddressForm.jsp" />
    <forward name="NewAddressForm" path="/jsp/checkout/NewAddressForm.jsp" />
   </action>

  <!-- validate the billing info form. -->
  <action path="/ValidateShippingInfo"
    type="com.mb.purcell.action.checkout.ValidateShippingInfo"
    name="usercheckout"
    input="/jsp/checkout/DisplayShippingForm.jsp"
    validate="true">
    <forward name="Success" path="/jsp/checkout/ReviewOrder.jsp" />
   </action>

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

Reply via email to