You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Oleg Mikheev (JIRA)" <ji...@apache.org> on 2007/04/27 12:43:43 UTC

[jira] Created: (WW-1899) AJAX validation doesn't work for actions with interceptors

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: Bug
          Components: Actions, Interceptors
    Affects Versions: 2.0.7
         Environment: Struts 2.0.7, XWorks 2.0.1
            Reporter: Oleg Mikheev


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.


[jira] Commented: (WW-1899) AJAX validation doesn't work for actions with interceptors

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

Musachy Barroso commented on WW-1899:
-------------------------------------

Just to let you know, validation will change in 2.1, a new interceptor will be available so DWR is not required anymore.

> 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
>
> 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.


[jira] Closed: (WW-1899) AJAX validation doesn't work for actions with interceptors

Posted by "Musachy Barroso (JIRA)" <ji...@apache.org>.
     [ 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.


[jira] Updated: (WW-1899) AJAX validation doesn't work for actions with interceptors

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

Oleg Mikheev updated WW-1899:
-----------------------------

    Issue Type: Improvement  (was: Bug)

Sorry,
was my fault - couldn't figure out that I should put
			<interceptor-ref name="defaultStack"/>
in addition to interceptors I use.
Documentation could be improved to describe this.
Current documentation also has its name as "default-stack" which is wrong.

> 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
>
> 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.


[jira] Assigned: (WW-1899) AJAX validation doesn't work for actions with interceptors

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

Musachy Barroso reassigned WW-1899:
-----------------------------------

    Assignee: Musachy Barroso

> 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
>
> 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.