You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Paul Benedict (JIRA)" <ji...@apache.org> on 2007/11/13 09:20:34 UTC
[jira] Updated: (STR-1142) ActionValidatorUtil
[ https://issues.apache.org/struts/browse/STR-1142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Benedict updated STR-1142:
-------------------------------
Affects Version/s: Future
Assignee: (was: Struts Developers)
> ActionValidatorUtil
> -------------------
>
> Key: STR-1142
> URL: https://issues.apache.org/struts/browse/STR-1142
> Project: Struts 1
> Issue Type: Improvement
> Components: Extras
> Affects Versions: Nightly Build, Future
> Environment: Operating System: All
> Platform: All
> Reporter: Brandon Goodin
> Priority: Minor
> Attachments: Action.txt, ActionValidatorUtil.java, ActionValidatorUtil.txt
>
>
> I just put together a class that uses the Validator from within a
> LookupDispatchAction. The class could be easily included into the Struts
> distribution. It is very useful to have the validation available to call
> from within the DispatchAction because different methods require different
> validation. Anyways, I have heard others speak of Action based validation
> (Craig included). This is not as useful in regular actions because the
> mapping allows for the flexibility. But for those of us who use the
> Dispatch... this type of validation is uesful. The code should be ready to
> drop in with no changes.
> FYI - The class extends DispatchAction and uses the same code as the
> LookupDispatchAction. I took the validation code from the
> ValidatorActionForm and included it in the ValidatorLookupDispatchAction
> class with some minor changes.
> I also, abstracted the method lookup process into a method
> called "lookupMethod". This allows for the method name to be retrieved from
> within the extended ValidatorLookupDispatchAction class for other purposes or
> custom configurations that might be used.
> Basically, the key that is looked up in the validation.xml form name is the
> ActionMapping url plus a dot method name. (.i.e. /myAction.do.edit <- edit
> is the method name).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.