You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Lukasz Racon (JIRA)" <ji...@apache.org> on 2008/08/14 15:58:25 UTC

[jira] Created: (WW-2768) s:form tag doesn't handle dynamic method invocation, it sets action value to action!method!method.

s:form tag doesn't handle dynamic method invocation, it sets action value to action!method!method.
--------------------------------------------------------------------------------------------------

                 Key: WW-2768
                 URL: https://issues.apache.org/struts/browse/WW-2768
             Project: Struts 2
          Issue Type: Bug
          Components: Core Actions
    Affects Versions: 2.1.2, 2.1.1, 2.1.0
            Reporter: Lukasz Racon
            Priority: Critical


<s:form action="action!method" ...> renders as: <form action="action!method!method" ...>

The bug was introduced in ServletUrlRenderer in 590812 revision. 

action variable used to be equivalent to actionName:
-               // handle "name!method" convention.
-               if (formComponent.enableDynamicMethodInvocation) {
-                       if (action.indexOf("!") != -1) {
-                               int endIdx = action.lastIndexOf("!");
-                               actionMethod = action.substring(endIdx + 1, action.length());
//this removes !method from action's value:
-                               action = action.substring(0, endIdx);
-                       }
-               }
...
-               String actionName = action;

Since this revision action variable may contain DMI mark (i.e. SomeAction!edit). This value is passed down the road to ActionMapping constructor (and other methods that expect pure action name):
			ActionMapping mapping = new ActionMapping(action, namespace, actionMethod, formComponent.parameters);
With DMI call looks like:
			new ActionMapping('SomeAction!edit!edit', '/', 'edit', ...) 
This results in an s:form tag's action attribute equal to 'SomeAction!edit!edit'.


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


[jira] Updated: (WW-2768) s:form tag doesn't handle dynamic method invocation, it sets action value to action!method!method.

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

James Holmes updated WW-2768:
-----------------------------

    Fix Version/s: 2.1.3

> s:form tag doesn't handle dynamic method invocation, it sets action value to action!method!method.
> --------------------------------------------------------------------------------------------------
>
>                 Key: WW-2768
>                 URL: https://issues.apache.org/struts/browse/WW-2768
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.1.0, 2.1.1, 2.1.2
>            Reporter: Lukasz Racon
>            Priority: Critical
>             Fix For: 2.1.3
>
>         Attachments: form_dmi.patch
>
>
> <s:form action="action!method" ...> renders as: <form action="action!method!method" ...>
> The bug was introduced in ServletUrlRenderer in 590812 revision. 
> action variable used to be equivalent to actionName:
> -               // handle "name!method" convention.
> -               if (formComponent.enableDynamicMethodInvocation) {
> -                       if (action.indexOf("!") != -1) {
> -                               int endIdx = action.lastIndexOf("!");
> -                               actionMethod = action.substring(endIdx + 1, action.length());
> //this removes !method from action's value:
> -                               action = action.substring(0, endIdx);
> -                       }
> -               }
> ...
> -               String actionName = action;
> Since this revision action variable may contain DMI mark (i.e. SomeAction!edit). This value is passed down the road to ActionMapping constructor (and other methods that expect pure action name):
> 			ActionMapping mapping = new ActionMapping(action, namespace, actionMethod, formComponent.parameters);
> With DMI call looks like:
> 			new ActionMapping('SomeAction!edit!edit', '/', 'edit', ...) 
> This results in an s:form tag's action attribute equal to 'SomeAction!edit!edit'.

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


[jira] Resolved: (WW-2768) s:form tag doesn't handle dynamic method invocation, it sets action value to action!method!method.

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

Wes Wannemacher resolved WW-2768.
---------------------------------

    Resolution: Fixed
      Assignee: Wes Wannemacher

Patch applied, thanks Lukasz!

> s:form tag doesn't handle dynamic method invocation, it sets action value to action!method!method.
> --------------------------------------------------------------------------------------------------
>
>                 Key: WW-2768
>                 URL: https://issues.apache.org/struts/browse/WW-2768
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.1.0, 2.1.1, 2.1.2
>            Reporter: Lukasz Racon
>            Assignee: Wes Wannemacher
>            Priority: Critical
>             Fix For: 2.1.3
>
>         Attachments: form_dmi.patch
>
>
> <s:form action="action!method" ...> renders as: <form action="action!method!method" ...>
> The bug was introduced in ServletUrlRenderer in 590812 revision. 
> action variable used to be equivalent to actionName:
> -               // handle "name!method" convention.
> -               if (formComponent.enableDynamicMethodInvocation) {
> -                       if (action.indexOf("!") != -1) {
> -                               int endIdx = action.lastIndexOf("!");
> -                               actionMethod = action.substring(endIdx + 1, action.length());
> //this removes !method from action's value:
> -                               action = action.substring(0, endIdx);
> -                       }
> -               }
> ...
> -               String actionName = action;
> Since this revision action variable may contain DMI mark (i.e. SomeAction!edit). This value is passed down the road to ActionMapping constructor (and other methods that expect pure action name):
> 			ActionMapping mapping = new ActionMapping(action, namespace, actionMethod, formComponent.parameters);
> With DMI call looks like:
> 			new ActionMapping('SomeAction!edit!edit', '/', 'edit', ...) 
> This results in an s:form tag's action attribute equal to 'SomeAction!edit!edit'.

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


[jira] Updated: (WW-2768) s:form tag doesn't handle dynamic method invocation, it sets action value to action!method!method.

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

Lukasz Racon updated WW-2768:
-----------------------------

    Attachment: form_dmi.patch

Test and a patch.

> s:form tag doesn't handle dynamic method invocation, it sets action value to action!method!method.
> --------------------------------------------------------------------------------------------------
>
>                 Key: WW-2768
>                 URL: https://issues.apache.org/struts/browse/WW-2768
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.1.0, 2.1.1, 2.1.2
>            Reporter: Lukasz Racon
>            Priority: Critical
>         Attachments: form_dmi.patch
>
>
> <s:form action="action!method" ...> renders as: <form action="action!method!method" ...>
> The bug was introduced in ServletUrlRenderer in 590812 revision. 
> action variable used to be equivalent to actionName:
> -               // handle "name!method" convention.
> -               if (formComponent.enableDynamicMethodInvocation) {
> -                       if (action.indexOf("!") != -1) {
> -                               int endIdx = action.lastIndexOf("!");
> -                               actionMethod = action.substring(endIdx + 1, action.length());
> //this removes !method from action's value:
> -                               action = action.substring(0, endIdx);
> -                       }
> -               }
> ...
> -               String actionName = action;
> Since this revision action variable may contain DMI mark (i.e. SomeAction!edit). This value is passed down the road to ActionMapping constructor (and other methods that expect pure action name):
> 			ActionMapping mapping = new ActionMapping(action, namespace, actionMethod, formComponent.parameters);
> With DMI call looks like:
> 			new ActionMapping('SomeAction!edit!edit', '/', 'edit', ...) 
> This results in an s:form tag's action attribute equal to 'SomeAction!edit!edit'.

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


[jira] Updated: (WW-2768) s:form tag doesn't handle dynamic method invocation, it sets action value to action!method!method.

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

Lukasz Racon updated WW-2768:
-----------------------------

    Flags: [Patch, Important]

> s:form tag doesn't handle dynamic method invocation, it sets action value to action!method!method.
> --------------------------------------------------------------------------------------------------
>
>                 Key: WW-2768
>                 URL: https://issues.apache.org/struts/browse/WW-2768
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.1.0, 2.1.1, 2.1.2
>            Reporter: Lukasz Racon
>            Priority: Critical
>         Attachments: form_dmi.patch
>
>
> <s:form action="action!method" ...> renders as: <form action="action!method!method" ...>
> The bug was introduced in ServletUrlRenderer in 590812 revision. 
> action variable used to be equivalent to actionName:
> -               // handle "name!method" convention.
> -               if (formComponent.enableDynamicMethodInvocation) {
> -                       if (action.indexOf("!") != -1) {
> -                               int endIdx = action.lastIndexOf("!");
> -                               actionMethod = action.substring(endIdx + 1, action.length());
> //this removes !method from action's value:
> -                               action = action.substring(0, endIdx);
> -                       }
> -               }
> ...
> -               String actionName = action;
> Since this revision action variable may contain DMI mark (i.e. SomeAction!edit). This value is passed down the road to ActionMapping constructor (and other methods that expect pure action name):
> 			ActionMapping mapping = new ActionMapping(action, namespace, actionMethod, formComponent.parameters);
> With DMI call looks like:
> 			new ActionMapping('SomeAction!edit!edit', '/', 'edit', ...) 
> This results in an s:form tag's action attribute equal to 'SomeAction!edit!edit'.

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