You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Dean Pullen (JIRA)" <ji...@apache.org> on 2009/02/12 17:06:45 UTC

[jira] Created: (WW-2997) Changing form to utilise an enctype multipart/form-data disables the 'method' or 'action' attribute of a s:submit button

Changing form to utilise an enctype multipart/form-data disables the 'method' or 'action' attribute of a s:submit button
------------------------------------------------------------------------------------------------------------------------

                 Key: WW-2997
                 URL: https://issues.apache.org/struts/browse/WW-2997
             Project: Struts 2
          Issue Type: Bug
          Components: Core Actions
    Affects Versions: 2.1.6
            Reporter: Dean Pullen


A simple form with multiple submit buttons, each going to a different action mapping (or method) works fine, for example:

<s:form action="UpdateDocument" method="post">
    <s:submit title="Unpublish" method="unpublish"  />
    <s:submit title="Publish" method="publish"  />
</s:form>

The Unpublish button will invoke the unpublish method of the Action class mapped to the UpdateDocument action.
Respectively, the Publish button will invoke the publish method of the Action class mapped to the UpdateDocument action.

Attempt to change the form to use a  multipart/form-data enctype (Which is important as we will be adding a file upload to this form), i.e.:

<s:form action="UpdateDocument" method="post" enctype="multipart/form-data">
    <s:submit title="Unpublish" method="unpublish"  />
    <s:submit title="Publish" method="publish"  />
</s:form>

Each button press will now only invoke the prepate method within 'UpdateDocument', not the correct unpublish or publish method declared within the submit tag.

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


[jira] Commented: (WW-2997) Changing form to utilise an enctype multipart/form-data disables the 'method' or 'action' attribute of a s:submit button

Posted by "Dean Pullen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2997?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45592#action_45592 ] 

Dean Pullen commented on WW-2997:
---------------------------------

This appears to be portlet specific. Using JBoss Portal 2.7.1.GA

> Changing form to utilise an enctype multipart/form-data disables the 'method' or 'action' attribute of a s:submit button
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WW-2997
>                 URL: https://issues.apache.org/struts/browse/WW-2997
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.1.6
>            Reporter: Dean Pullen
>
> A simple form with multiple submit buttons, each going to a different action mapping (or method) works fine, for example:
> <s:form action="UpdateDocument" method="post">
>     <s:submit title="Unpublish" method="unpublish"  />
>     <s:submit title="Publish" method="publish"  />
> </s:form>
> The Unpublish button will invoke the unpublish method of the Action class mapped to the UpdateDocument action.
> Respectively, the Publish button will invoke the publish method of the Action class mapped to the UpdateDocument action.
> Attempt to change the form to use a  multipart/form-data enctype (Which is important as we will be adding a file upload to this form), i.e.:
> <s:form action="UpdateDocument" method="post" enctype="multipart/form-data">
>     <s:submit title="Unpublish" method="unpublish"  />
>     <s:submit title="Publish" method="publish"  />
> </s:form>
> Each button press will now only invoke the prepate method within 'UpdateDocument', not the correct unpublish or publish method declared within the submit tag.

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


[jira] Resolved: (WW-2997) Changing form to utilise an enctype multipart/form-data disables the 'method' or 'action' attribute of a s:submit button

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

Nils-Helge Garli resolved WW-2997.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1.7

Should be fixed in trunk. Please build and verify the fix.

> Changing form to utilise an enctype multipart/form-data disables the 'method' or 'action' attribute of a s:submit button
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WW-2997
>                 URL: https://issues.apache.org/struts/browse/WW-2997
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions, Plugin - Portlet
>    Affects Versions: 2.1.6
>            Reporter: Dean Pullen
>             Fix For: 2.1.7
>
>
> A simple form with multiple submit buttons, each going to a different action mapping (or method) works fine, for example:
> <s:form action="UpdateDocument" method="post">
>     <s:submit title="Unpublish" method="unpublish"  />
>     <s:submit title="Publish" method="publish"  />
> </s:form>
> The Unpublish button will invoke the unpublish method of the Action class mapped to the UpdateDocument action.
> Respectively, the Publish button will invoke the publish method of the Action class mapped to the UpdateDocument action.
> Attempt to change the form to use a  multipart/form-data enctype (Which is important as we will be adding a file upload to this form), i.e.:
> <s:form action="UpdateDocument" method="post" enctype="multipart/form-data">
>     <s:submit title="Unpublish" method="unpublish"  />
>     <s:submit title="Publish" method="publish"  />
> </s:form>
> Each button press will now only invoke the prepate method within 'UpdateDocument', not the correct unpublish or publish method declared within the submit tag.

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


[jira] Updated: (WW-2997) Changing form to utilise an enctype multipart/form-data disables the 'method' or 'action' attribute of a s:submit button

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

Dean Pullen updated WW-2997:
----------------------------

    Component/s: Plugin - Portlet

Added to portlet-plugin component

> Changing form to utilise an enctype multipart/form-data disables the 'method' or 'action' attribute of a s:submit button
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WW-2997
>                 URL: https://issues.apache.org/struts/browse/WW-2997
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions, Plugin - Portlet
>    Affects Versions: 2.1.6
>            Reporter: Dean Pullen
>
> A simple form with multiple submit buttons, each going to a different action mapping (or method) works fine, for example:
> <s:form action="UpdateDocument" method="post">
>     <s:submit title="Unpublish" method="unpublish"  />
>     <s:submit title="Publish" method="publish"  />
> </s:form>
> The Unpublish button will invoke the unpublish method of the Action class mapped to the UpdateDocument action.
> Respectively, the Publish button will invoke the publish method of the Action class mapped to the UpdateDocument action.
> Attempt to change the form to use a  multipart/form-data enctype (Which is important as we will be adding a file upload to this form), i.e.:
> <s:form action="UpdateDocument" method="post" enctype="multipart/form-data">
>     <s:submit title="Unpublish" method="unpublish"  />
>     <s:submit title="Publish" method="publish"  />
> </s:form>
> Each button press will now only invoke the prepate method within 'UpdateDocument', not the correct unpublish or publish method declared within the submit tag.

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


[jira] Commented: (WW-2997) Changing form to utilise an enctype multipart/form-data disables the 'method' or 'action' attribute of a s:submit button

Posted by "Kevin DIMEY (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2997?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45594#action_45594 ] 

Kevin DIMEY commented on WW-2997:
---------------------------------

I got the same issue until I updated commons-io from 1.1 to 1.3.2
It works fine now.

> Changing form to utilise an enctype multipart/form-data disables the 'method' or 'action' attribute of a s:submit button
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WW-2997
>                 URL: https://issues.apache.org/struts/browse/WW-2997
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions, Plugin - Portlet
>    Affects Versions: 2.1.6
>            Reporter: Dean Pullen
>
> A simple form with multiple submit buttons, each going to a different action mapping (or method) works fine, for example:
> <s:form action="UpdateDocument" method="post">
>     <s:submit title="Unpublish" method="unpublish"  />
>     <s:submit title="Publish" method="publish"  />
> </s:form>
> The Unpublish button will invoke the unpublish method of the Action class mapped to the UpdateDocument action.
> Respectively, the Publish button will invoke the publish method of the Action class mapped to the UpdateDocument action.
> Attempt to change the form to use a  multipart/form-data enctype (Which is important as we will be adding a file upload to this form), i.e.:
> <s:form action="UpdateDocument" method="post" enctype="multipart/form-data">
>     <s:submit title="Unpublish" method="unpublish"  />
>     <s:submit title="Publish" method="publish"  />
> </s:form>
> Each button press will now only invoke the prepate method within 'UpdateDocument', not the correct unpublish or publish method declared within the submit tag.

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


[jira] Commented: (WW-2997) Changing form to utilise an enctype multipart/form-data disables the 'method' or 'action' attribute of a s:submit button

Posted by "Dean Pullen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2997?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45597#action_45597 ] 

Dean Pullen commented on WW-2997:
---------------------------------

Kevin thanks for the ping. We're using 1.3.2, and still have this issue.

We believe it's unrelated to commons-io as we see all associated params being sent through to Struts upon a form submission.

> Changing form to utilise an enctype multipart/form-data disables the 'method' or 'action' attribute of a s:submit button
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WW-2997
>                 URL: https://issues.apache.org/struts/browse/WW-2997
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions, Plugin - Portlet
>    Affects Versions: 2.1.6
>            Reporter: Dean Pullen
>
> A simple form with multiple submit buttons, each going to a different action mapping (or method) works fine, for example:
> <s:form action="UpdateDocument" method="post">
>     <s:submit title="Unpublish" method="unpublish"  />
>     <s:submit title="Publish" method="publish"  />
> </s:form>
> The Unpublish button will invoke the unpublish method of the Action class mapped to the UpdateDocument action.
> Respectively, the Publish button will invoke the publish method of the Action class mapped to the UpdateDocument action.
> Attempt to change the form to use a  multipart/form-data enctype (Which is important as we will be adding a file upload to this form), i.e.:
> <s:form action="UpdateDocument" method="post" enctype="multipart/form-data">
>     <s:submit title="Unpublish" method="unpublish"  />
>     <s:submit title="Publish" method="publish"  />
> </s:form>
> Each button press will now only invoke the prepate method within 'UpdateDocument', not the correct unpublish or publish method declared within the submit tag.

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