You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "James Holmes (JIRA)" <ji...@apache.org> on 2007/10/03 15:32:37 UTC

[jira] Updated: (WW-2217) DWRvalidator ignores method when creating action proxy

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

James Holmes updated WW-2217:
-----------------------------

    Fix Version/s: 2.0.12

> DWRvalidator ignores method when creating action proxy
> ------------------------------------------------------
>
>                 Key: WW-2217
>                 URL: https://issues.apache.org/struts/browse/WW-2217
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Validation
>    Affects Versions: 2.0.8
>         Environment: Windows XP SP2, JBoss-4.2.0, Firefox/2.0.0.7
>            Reporter: Oleg Gorobets
>             Fix For: 2.0.12
>
>
> Seems like DWR validator is ignoring action method when creating proxy. Therefore ajax validation is always run on execute() method. See code below.
> ===================================================================
> DWRValidator.java
> ===================================================================
>  Configuration cfg = du.getConfigurationManager().getConfiguration();
>  ValidatorActionProxy proxy = new ValidatorActionProxy(namespace, action, ctx);
> cfg.getContainer().inject(proxy);
>             proxy.prepare();
>             proxy.execute();
> ===================================================================
> Possibly should be changed to something like
> ===================================================================
>             Configuration cfg = du.getConfigurationManager().getConfiguration();
>             String method = null;
>             if (action.indexOf('!')>=0) {
>             	             method = action.substring(action.indexOf('!')+1);
>         		action = action.substring(0,action.indexOf('!'));
>             }
>             ValidatorActionProxy proxy = new ValidatorActionProxy(namespace, action, ctx);
>             if (method != null) {
>             	             proxy.setMethod(method);
>             }
>             cfg.getContainer().inject(proxy);
>             proxy.prepare();
>             proxy.execute();
> ===================================================================

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