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

Don Brown resolved WW-2217.
---------------------------

    Resolution: Fixed
      Assignee: Don Brown

> 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: XML Validators
>    Affects Versions: 2.0.8
>         Environment: Windows XP SP2, JBoss-4.2.0, Firefox/2.0.0.7
>            Reporter: Oleg Gorobets
>            Assignee: Don Brown
>             Fix For: 2.1.1
>
>
> 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.

Reply via email to