You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Ted Husted (JIRA)" <ji...@apache.org> on 2007/09/18 11:26:36 UTC

[jira] Created: (WW-2191) Make validateAnnotatedMethodOnly the default and support client-side method-only validations

Make validateAnnotatedMethodOnly the default and support client-side method-only validations
--------------------------------------------------------------------------------------------

                 Key: WW-2191
                 URL: https://issues.apache.org/struts/browse/WW-2191
             Project: Struts 2
          Issue Type: Improvement
          Components: Validation
            Reporter: Ted Husted
             Fix For: 2.1.x


A common use case for validation annotations is to use different validations per action method. However, in 2.0.x, the default is to combine the validations. A better default would be "true". 

                <interceptor-ref name="validation">
				   <param name="validateAnnotatedMethodOnly">true</param>                
                    <param name="excludeMethods">input,back,cancel,browse</param>
                </interceptor-ref>

Also, per-method client-side validation does not seem to be supported. 



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


[jira] Commented: (WW-2191) Make validateAnnotatedMethodOnly the default and support client-side method-only validations

Posted by "Ted Husted (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_42217 ] 

Ted Husted commented on WW-2191:
--------------------------------

I just noticed a side-effect of setting validateAnnotatedMethodOnly to true is that it also bypasses property annotations made to methods in a base class. 

The problem here is that a useful strategy is to put "format" property validations on a base class, and then required and conditional validations on the action methods. So, I guess were looking for validateAnnotatedActionMethodOnly, but still validation any and all property validatons. 

-Ted.


> Make validateAnnotatedMethodOnly the default and support client-side method-only validations
> --------------------------------------------------------------------------------------------
>
>                 Key: WW-2191
>                 URL: https://issues.apache.org/struts/browse/WW-2191
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Validation
>            Reporter: Ted Husted
>             Fix For: 2.1.x
>
>
> A common use case for validation annotations is to use different validations per action method. However, in 2.0.x, the default is to combine the validations. A better default would be "true". 
>                 <interceptor-ref name="validation">
> 				   <param name="validateAnnotatedMethodOnly">true</param>                
>                     <param name="excludeMethods">input,back,cancel,browse</param>
>                 </interceptor-ref>
> Also, per-method client-side validation does not seem to be supported. 

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


[jira] Commented: (WW-2191) Make validateAnnotatedMethodOnly the default and support client-side method-only validations

Posted by "Lukasz Racon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46425#action_46425 ] 

Lukasz Racon commented on WW-2191:
----------------------------------

Javascript validation patch for annotated methods is here WW-600

> Make validateAnnotatedMethodOnly the default and support client-side method-only validations
> --------------------------------------------------------------------------------------------
>
>                 Key: WW-2191
>                 URL: https://issues.apache.org/struts/browse/WW-2191
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Plugin - CodeBehind
>            Reporter: Ted Husted
>             Fix For: 2.2.x
>
>
> A common use case for validation annotations is to use different validations per action method. However, in 2.0.x, the default is to combine the validations. A better default would be "true". 
>                 <interceptor-ref name="validation">
> 				   <param name="validateAnnotatedMethodOnly">true</param>                
>                     <param name="excludeMethods">input,back,cancel,browse</param>
>                 </interceptor-ref>
> Also, per-method client-side validation does not seem to be supported. 

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


[jira] Commented: (WW-2191) Make validateAnnotatedMethodOnly the default and support client-side method-only validations

Posted by "Musachy Barroso (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44198#action_44198 ] 

Musachy Barroso commented on WW-2191:
-------------------------------------

I think the current behavior is not intuitive at all, if a method is annotated for validation, only that ,method should be validated. It just happened to me and I was confused for a little bit (ended up debugging the validation interceptor)

> Make validateAnnotatedMethodOnly the default and support client-side method-only validations
> --------------------------------------------------------------------------------------------
>
>                 Key: WW-2191
>                 URL: https://issues.apache.org/struts/browse/WW-2191
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Plugin - CodeBehind
>            Reporter: Ted Husted
>             Fix For: 2.2.x
>
>
> A common use case for validation annotations is to use different validations per action method. However, in 2.0.x, the default is to combine the validations. A better default would be "true". 
>                 <interceptor-ref name="validation">
> 				   <param name="validateAnnotatedMethodOnly">true</param>                
>                     <param name="excludeMethods">input,back,cancel,browse</param>
>                 </interceptor-ref>
> Also, per-method client-side validation does not seem to be supported. 

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


[jira] Updated: (WW-2191) Make validateAnnotatedMethodOnly the default and support client-side method-only validations

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

Don Brown updated WW-2191:
--------------------------

    Fix Version/s:     (was: 2.1.4)
                   2.2.x

> Make validateAnnotatedMethodOnly the default and support client-side method-only validations
> --------------------------------------------------------------------------------------------
>
>                 Key: WW-2191
>                 URL: https://issues.apache.org/struts/browse/WW-2191
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Plugin - CodeBehind
>            Reporter: Ted Husted
>             Fix For: 2.2.x
>
>
> A common use case for validation annotations is to use different validations per action method. However, in 2.0.x, the default is to combine the validations. A better default would be "true". 
>                 <interceptor-ref name="validation">
> 				   <param name="validateAnnotatedMethodOnly">true</param>                
>                     <param name="excludeMethods">input,back,cancel,browse</param>
>                 </interceptor-ref>
> Also, per-method client-side validation does not seem to be supported. 

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