You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Tom Terrace (JIRA)" <ji...@apache.org> on 2010/08/06 23:32:18 UTC

[jira] Created: (WW-3478) Allow exceptions to be thrown from the validate() method

Allow exceptions to be thrown from the validate() method
--------------------------------------------------------

                 Key: WW-3478
                 URL: https://issues.apache.org/jira/browse/WW-3478
             Project: Struts 2
          Issue Type: New Feature
          Components: Core Actions
    Affects Versions: 2.2.1
            Reporter: Tom Terrace
            Priority: Minor


In the ValidationInterceptor, any exceptions from the validation prefix methods validateXXX and validateDoXXX are rethrown, but we can't throw anything from the plain validate() method.  It would be great to just have one validate method that can fetch the model and throw any security or RecordNotFound exceptions rather than a whole bunch of identical validateXXX methods.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WW-3478) Allow exceptions to be thrown from the validate() method

Posted by "Tom Terrace (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WW-3478?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tom Terrace updated WW-3478:
----------------------------

    Attachment: validation-exception-patch.txt

Patch to add a throws statement for the validate method in the Validateable interface and ActionSupport class

> Allow exceptions to be thrown from the validate() method
> --------------------------------------------------------
>
>                 Key: WW-3478
>                 URL: https://issues.apache.org/jira/browse/WW-3478
>             Project: Struts 2
>          Issue Type: New Feature
>          Components: Core Actions
>    Affects Versions: 2.2.1
>            Reporter: Tom Terrace
>            Priority: Minor
>         Attachments: validation-exception-patch.txt
>
>
> In the ValidationInterceptor, any exceptions from the validation prefix methods validateXXX and validateDoXXX are rethrown, but we can't throw anything from the plain validate() method.  It would be great to just have one validate method that can fetch the model and throw any security or RecordNotFound exceptions rather than a whole bunch of identical validateXXX methods.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.