RE: Difference between ValidatorForm and ValidatorActionForm

2004-03-24 Thread Janarthan Sathiamurthy
Hi,

ValidatorActionForm -
This class extends ValidatorForm and provides basic field validation based on an XML 
file. The key passed into the validator is the action element's 'path' attribute from 
the struts-config.xml which should match the form element's name attribute in the 
validation.xml.

ValidatorForm - 
This class extends ActionForm and provides basic field validation based on an XML 
file. The key passed into the validator is the action element's 'name' attribute from 
the struts-config.xml which should match the form element's name attribute in the 
validation.xml.
 

See the BOLD words and you will get the difference...

Best Regards,

Janarthan S

-Original Message-
From: Joao Batistella [ mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 3:41 PM
To: 'Struts Users Mailing List'
Subject: Difference between ValidatorForm and ValidatorActionForm


Hello!

I would like to know the difference between ValidatorForm and
ValidatorActionForm. I read the API documentation but the descriptions are
the same.

When should I use each one?

Thanks,
JP




Difference between ValidatorForm and ValidatorActionForm

2004-03-24 Thread Joao Batistella
Hello!

I would like to know the difference between ValidatorForm and
ValidatorActionForm. I read the API documentation but the descriptions are
the same.

When should I use each one?

Thanks,
JP


Difference between ValidatorForm and ValidatorActionForm?

2003-06-26 Thread Yansheng Lin

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]



RE: Difference between ValidatorForm and ValidatorActionForm?

2003-06-26 Thread Butash, Bob
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]



RE: Difference between ValidatorForm and ValidatorActionForm?

2003-06-26 Thread Kamholz, Keith (corp-staff) USX
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]



RE: Difference between ValidatorForm and ValidatorActionForm?

2003-06-26 Thread Butash, Bob
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]



Re: Difference between ValidatorForm and ValidatorActionForm?

2003-06-26 Thread Jamie M. Guillemette
The core difference is what will be used as reference when running the
validation

lets say you have an form object that spans 3 actions ( is shared by ) and
all of them have validate = true in the struts-config.xml

if you use ValidatorForm to then all of the validation rules you specify
will be run.

which may or may not be good..

if you use ValidatorActionForm then you can break up the validation rules
into chuncks based on the action that was run.

The only difference in the validation setup is wether your form entrie
referes to the form object or the action.


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