[ 
https://issues.apache.org/struts/browse/WW-1899?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Musachy Barroso closed WW-1899.
-------------------------------

       Resolution: Not A Problem
    Fix Version/s: 2.1.0

Closing this issue as ajax validation has changed for 2.1

> AJAX validation doesn't work for actions with interceptors
> ----------------------------------------------------------
>
>                 Key: WW-1899
>                 URL: https://issues.apache.org/struts/browse/WW-1899
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Actions, Interceptors
>    Affects Versions: 2.0.7
>         Environment: Struts 2.0.7, XWorks 2.0.1
>            Reporter: Oleg Mikheev
>         Assigned To: Musachy Barroso
>             Fix For: 2.1.0
>
>
> Ajax validation started to work again in 2.0.7 after being corrupted in 
> previous versions.
> But when you have interceptor for an action if fails to validate action.
> I tried roles and exception validators.
> My config:
>       <package name="test" extends="struts-default">
>               <action name="HelloWorld_*" method="{1}"
>                               class="test.HelloWorld">
>                       <interceptor-ref name="exception"/>
>                       <result>/HelloWorld.jsp</result>
>                       <result name="input">/HelloWorld.jsp</result>
>               </action>
>       </package>
> My page:
> <html>
> <s:head title="Hello AJAX" theme="ajax" debug="true"/>
> <body>
> <s:form action="HelloWorld" validate="true" theme="ajax">
>       <s:textfield label="Number" name="number"/>
>       <s:password label="Text" name="text"/>
> </s:form>
> </body>
> </html>
> My validator:
> <validators>
>       <validator type="required">
>               <param name="fieldName">number</param>
>               <message>Number must be present</message>
>       </validator>
>       <validator type="int">
>               <param name="fieldName">number</param>
>               <param name="min">20</param>
>               <param name="max">50</param>
>               <message>Number needs to be between ${min} and ${max}</message>
>       </validator>
>       <validator type="requiredstring">
>               <param name="fieldName">text</param>
>               <message>Text must be present</message>
>       </validator>
> </validators>

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

Reply via email to