Keith,

I'm currently reading Programming Jakarta Struts by Chuck Cavaness.  It has
been a really good book so far and gives you a strong foundation to build
on.

In you validation.xml file for the form element's name attribute you need to
give the action's name that you want the validation rule to be in effect
for.

Example validation.xml entry:
    <formset>              
        <form name="/rootSelection">
                        <field property="rootPath" depends="required">
                                <arg0 key="formFields.rootPath"/>
                        </field>
        </form>
   </formset>

Example Action Mapping:
<action         path="/rootSelection" 
        
type="com.eds.bluesphere.propertywizard.component.RootPathSelectionProcess" 
                name="rootSelectionForm" scope="request" 
                validate="true" 
                input="/jsp/rootPathSelectionDisplay.jsp">
</action>

The ValidatorActionForm will obtain the ActionForm name from your
ActionMapping.

Hope this helps.

-----Original Message-----
From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 26, 2003 1:05 PM
To: 'Struts Users Mailing List'
Subject: RE: Difference between ValidatorForm and ValidatorActionForm?


So do you have to do anything differently in your validation.xml?
Also, where can I find some documentation on this?

- Keith


-----Original Message-----
From: Butash, Bob [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 26, 2003 12:59 PM
To: 'Struts Users Mailing List'
Subject: RE: Difference between ValidatorForm and ValidatorActionForm?


Yansheng,

Since ActionForms are intended to be reused across multiple actions, you
might have different validation requirements depending on the context that
the ActionForm is being used.

One Action might require a certain field but that field may not be required
for another Action that is using the same ActionForm.

Hope this helps.

-----Original Message-----
From: Yansheng Lin [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 26, 2003 11:52 AM
To: 'Struts Users Mailing List'
Subject: Difference between ValidatorForm and ValidatorActionForm?



I kind of understand it.  ValidatorForm validates the form and
ValidatorActionForm validates the form based on action path.  But why would
you
prefer one over the other?  I mean you can achieve almost the same effect
with
either.

Thanks!


---------------------------------------------------------------------
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]

---------------------------------------------------------------------
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]

Reply via email to