Scott Purcell wrote:
What do you mean by the action mappings as the keys in the validation file?
If I have the following in my struts-config.xml
<action path="/ValidateShippingInfo"
type="com.mb.purcell.action.checkout.ValidateShippingInfo"
name="shippingcheckout"
input="/jsp/checkout/DisplayShippingForm.jsp"
validate="true">
<forward name="Success" path="/jsp/checkout/ReviewOrder.jsp" />
</action>
what is the action mapping you are describing?
Action mappings map an action to a URL, or the 'path' attribute.
And then instead of the bean name in the validation, I can use that name?
Yep: in the validation config you'd say (more or less)
<form name='/ValidateShippingInfo'>
<field...
And if you use the bean in another action, like '/JavaDocsRule' you have
another entry
<form name='/JavaDocsRule'>
<field...
so you can reuse beans across actions, validating only the important
fields (for instance, you could have a single 'user' bean and have a
different action for editing each field inside the bean with the
appropriate validation config for each action. Same bean, different
action and validation.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]