[ https://issues.apache.org/struts/browse/WW-2050?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Musachy Barroso resolved WW-2050. --------------------------------- Resolution: Fixed > Separate JSONValidationInterceptor from AnnotationValidationInterceptor > ----------------------------------------------------------------------- > > Key: WW-2050 > URL: https://issues.apache.org/struts/browse/WW-2050 > Project: Struts 2 > Issue Type: Improvement > Components: Core Interceptors > Affects Versions: 2.1.0 > Reporter: Lukasz Racon > Assignee: Musachy Barroso > Priority: Minor > Fix For: 2.1.1 > > Attachments: jsonvalidator.diff, validation2.js > > > Since JSONValidationInterceptor extends AnnotationValidationInterceptor it > should behave exactly as AnnotationValidationInterceptor does. > Here are the problems: > - JSONValidationInterceptor ignores @SkipValidation > - it always performs jason validation. You have to have separate stacks for > different validation strategies. IMHO as a replacement it should as default > let the workflow/annotationWorkflow controller to decide what to do. > - JSON validation should be triggered by a request parameter (for example set > by the sx:submit tag, or to be precise by Bind widget) > Proposed solution: > JSONValidationInterceptor should be an interceptor (not a validating one). It > should be positioned in the stack after the 'validation' and before > 'workflow'. This way its sole purpose would be to check for request param > trigger and action that has errors and return errors as json. Other > interceptors will be responsible for validation and setting the errors on the > action. This setup would allow JSON validation to coexist with old submit > form validation - meaning you would have one stack for both. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.