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

[jira] Created: (WW-2370) URL tag: "method" attribute without effect when "action" not specified

URL tag: "method" attribute without effect when "action" not specified
----------------------------------------------------------------------

                 Key: WW-2370
                 URL: https://issues.apache.org/struts/browse/WW-2370
             Project: Struts 2
          Issue Type: Bug
    Affects Versions: 2.0.11
         Environment: JBoss 4.2
            Reporter: Aleksander Adamowski


I'm creating a simple JSR-168 portlet and my struts package inherits from struts-portlet-default.

I've noticed that on simple usage of the "url" and "a" tags, when I omit the "action" attribute (so that the URL point to the current action's URL), and specify the "method" attribute, the "method" attribute has no effect - the default execute() method is invoked on the current action.

But when I specify the "action" attribute, with the  current action as its value, the "method" attribute works and the specified method is invoked on the current action.

I suspect that this is not an intended behaviour. It's definitely not documented and one would expect the "method" attribute to work even when "action" attribute is omitted (in the spirit of zero configuration and convention over configuration...)



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


[jira] Issue Comment Edited: (WW-2370) URL tag: "method" attribute without effect when "action" not specified

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

olo edited comment on WW-2370 at 12/11/07 7:39 PM:
--------------------------------------------------------------------

Here's the relevant JSP fragment:

<s:if test="employees.size > 0">
	<table>
		<s:iterator value="employees">
			<tr id="row_<s:property value="idEmployee"/>">
				<td><s:property value="idEmployee" /></td>
				<td><s:property value="emplForeName" /></td>
				<td><s:property value="emplSurName" /></td>
				<td>
				<s:url id="removeUrl" action="index" method="remove">
					<s:param name="idEmployee" value="idEmployee" />
				</s:url>
				<s:a href="%{removeUrl}">Delete</s:a>
..........etc....

if I omit the action="index" attribute, then method="remove" has no effect.

      was (Author: olo):
    Here's the relevant JSP fragment:

<s:if test="employees.size > 0">
	<table>
		<s:iterator value="employees">
			<tr id="row_<s:property value="idEmployee"/>">
				<td><s:property value="idEmployee" /></td>
				<td><s:property value="emplForeName" /></td>
				<td><s:property value="emplSurName" /></td>
				<td>
				<s:url id="removeUrl" action="index" method="remove">
					<s:param name="idEmployee" value="idEmployee" />
				</s:url>
				<s:a href="%{removeUrl}">Delete</s:a>
..........etc....

  
> URL tag: "method" attribute without effect when "action" not specified
> ----------------------------------------------------------------------
>
>                 Key: WW-2370
>                 URL: https://issues.apache.org/struts/browse/WW-2370
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.11
>         Environment: JBoss 4.2
>            Reporter: Aleksander Adamowski
>
> I'm creating a simple JSR-168 portlet and my struts package inherits from struts-portlet-default.
> I've noticed that on simple usage of the "url" and "a" tags, when I omit the "action" attribute (so that the URL point to the current action's URL), and specify the "method" attribute, the "method" attribute has no effect - the default execute() method is invoked on the current action.
> But when I specify the "action" attribute, with the  current action as its value, the "method" attribute works and the specified method is invoked on the current action.
> I suspect that this is not an intended behaviour. It's definitely not documented and one would expect the "method" attribute to work even when "action" attribute is omitted (in the spirit of zero configuration and convention over configuration...)

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


[jira] Issue Comment Edited: (WW-2370) URL tag: "method" attribute without effect when "action" not specified

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

olo edited comment on WW-2370 at 12/11/07 7:40 PM:
--------------------------------------------------------------------

Here's the relevant JSP fragment:

<s:if test="employees.size > 0">
	<table>
		<s:iterator value="employees">
			<tr id="row_<s:property value="idEmployee"/>">
				<td><s:property value="idEmployee" /></td>
				<td><s:property value="emplForeName" /></td>
				<td><s:property value="emplSurName" /></td>
				<td>
				<s:url id="removeUrl" action="index" method="remove">
					<s:param name="idEmployee" value="idEmployee" />
				</s:url>
				<s:a href="%{removeUrl}">Delete</s:a>
..........etc....

if I omit this attribute in url tag:
action="index"

then this attribute has no effect:
method="remove"

otherwise, it works fine.

      was (Author: olo):
    Here's the relevant JSP fragment:

<s:if test="employees.size > 0">
	<table>
		<s:iterator value="employees">
			<tr id="row_<s:property value="idEmployee"/>">
				<td><s:property value="idEmployee" /></td>
				<td><s:property value="emplForeName" /></td>
				<td><s:property value="emplSurName" /></td>
				<td>
				<s:url id="removeUrl" action="index" method="remove">
					<s:param name="idEmployee" value="idEmployee" />
				</s:url>
				<s:a href="%{removeUrl}">Delete</s:a>
..........etc....

if I omit the action="index" attribute, then method="remove" has no effect.
  
> URL tag: "method" attribute without effect when "action" not specified
> ----------------------------------------------------------------------
>
>                 Key: WW-2370
>                 URL: https://issues.apache.org/struts/browse/WW-2370
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.11
>         Environment: JBoss 4.2
>            Reporter: Aleksander Adamowski
>
> I'm creating a simple JSR-168 portlet and my struts package inherits from struts-portlet-default.
> I've noticed that on simple usage of the "url" and "a" tags, when I omit the "action" attribute (so that the URL point to the current action's URL), and specify the "method" attribute, the "method" attribute has no effect - the default execute() method is invoked on the current action.
> But when I specify the "action" attribute, with the  current action as its value, the "method" attribute works and the specified method is invoked on the current action.
> I suspect that this is not an intended behaviour. It's definitely not documented and one would expect the "method" attribute to work even when "action" attribute is omitted (in the spirit of zero configuration and convention over configuration...)

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


[jira] Commented: (WW-2370) URL tag: "method" attribute without effect when "action" not specified

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

Aleksander Adamowski commented on WW-2370:
------------------------------------------

Here's the relevant JSP fragment:

<s:if test="employees.size > 0">
	<table>
		<s:iterator value="employees">
			<tr id="row_<s:property value="idEmployee"/>">
				<td><s:property value="idEmployee" /></td>
				<td><s:property value="emplForeName" /></td>
				<td><s:property value="emplSurName" /></td>
				<td>
				<s:url id="removeUrl" action="index" method="remove">
					<s:param name="idEmployee" value="idEmployee" />
				</s:url>
				<s:a href="%{removeUrl}">Delete</s:a>
..........etc....


> URL tag: "method" attribute without effect when "action" not specified
> ----------------------------------------------------------------------
>
>                 Key: WW-2370
>                 URL: https://issues.apache.org/struts/browse/WW-2370
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.11
>         Environment: JBoss 4.2
>            Reporter: Aleksander Adamowski
>
> I'm creating a simple JSR-168 portlet and my struts package inherits from struts-portlet-default.
> I've noticed that on simple usage of the "url" and "a" tags, when I omit the "action" attribute (so that the URL point to the current action's URL), and specify the "method" attribute, the "method" attribute has no effect - the default execute() method is invoked on the current action.
> But when I specify the "action" attribute, with the  current action as its value, the "method" attribute works and the specified method is invoked on the current action.
> I suspect that this is not an intended behaviour. It's definitely not documented and one would expect the "method" attribute to work even when "action" attribute is omitted (in the spirit of zero configuration and convention over configuration...)

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


[jira] Reopened: (WW-2370) URL tag: "method" attribute without effect when "action" not specified

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

Nils-Helge Garli reopened WW-2370:
----------------------------------

      Assignee: Nils-Helge Garli

> URL tag: "method" attribute without effect when "action" not specified
> ----------------------------------------------------------------------
>
>                 Key: WW-2370
>                 URL: https://issues.apache.org/struts/browse/WW-2370
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.11
>         Environment: JBoss 4.2
>            Reporter: Aleksander Adamowski
>            Assignee: Nils-Helge Garli
>             Fix For: 2.1.1
>
>
> I'm creating a simple JSR-168 portlet and my struts package inherits from struts-portlet-default.
> I've noticed that on simple usage of the "url" and "a" tags, when I omit the "action" attribute (so that the URL point to the current action's URL), and specify the "method" attribute, the "method" attribute has no effect - the default execute() method is invoked on the current action.
> But when I specify the "action" attribute, with the  current action as its value, the "method" attribute works and the specified method is invoked on the current action.
> I suspect that this is not an intended behaviour. It's definitely not documented and one would expect the "method" attribute to work even when "action" attribute is omitted (in the spirit of zero configuration and convention over configuration...)

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


[jira] Resolved: (WW-2370) URL tag: "method" attribute without effect when "action" not specified

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

Nils-Helge Garli resolved WW-2370.
----------------------------------

    Resolution: Fixed

> URL tag: "method" attribute without effect when "action" not specified
> ----------------------------------------------------------------------
>
>                 Key: WW-2370
>                 URL: https://issues.apache.org/struts/browse/WW-2370
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.11
>         Environment: JBoss 4.2
>            Reporter: Aleksander Adamowski
>            Assignee: Nils-Helge Garli
>             Fix For: 2.1.1
>
>
> I'm creating a simple JSR-168 portlet and my struts package inherits from struts-portlet-default.
> I've noticed that on simple usage of the "url" and "a" tags, when I omit the "action" attribute (so that the URL point to the current action's URL), and specify the "method" attribute, the "method" attribute has no effect - the default execute() method is invoked on the current action.
> But when I specify the "action" attribute, with the  current action as its value, the "method" attribute works and the specified method is invoked on the current action.
> I suspect that this is not an intended behaviour. It's definitely not documented and one would expect the "method" attribute to work even when "action" attribute is omitted (in the spirit of zero configuration and convention over configuration...)

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