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:40:34 UTC

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

    [ 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.