You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Lukas Bradley <lu...@somnia.com> on 2003/05/10 18:02:38 UTC

Purpose of ValidatorActionForm vs ValidatorForm?

Why was the ValidatorActionForm designed?

The only difference is the latter uses mapping.getAttribute() for its
initValidator within the validate() method, while ValidatorActionForm uses
getPath().

Lukas




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: Purpose of ValidatorActionForm vs ValidatorForm?

Posted by Steve Raeburn <st...@ninsky.com>.
The ValidatorActionForm validates based on the path of the
Action.
The ValidatorForm uses the name of the ActionForm.

In a situation where several Actions use the same form, you
may wish to perform different validations depending on which
Action is being performed. The ValidatorActionForm allows
that.

Steve

-----Original Message-----
From: Lukas Bradley [mailto:lukas@somnia.com]
Sent: May 10, 2003 9:03 AM
To: struts-user@jakarta.apache.org
Subject: Purpose of ValidatorActionForm vs ValidatorForm?


Why was the ValidatorActionForm designed?

The only difference is the latter uses
mapping.getAttribute() for its
initValidator within the validate() method, while
ValidatorActionForm uses
getPath().

Lukas




------------------------------------------------------------
---------
To unsubscribe, e-mail:
struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail:
struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org