You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Shane Frensley (JIRA)" <ji...@apache.org> on 2007/09/16 22:12:36 UTC
[jira] Created: (WW-2186) Restful2ActionMapper does not process id
when dynamic method is specified
Restful2ActionMapper does not process id when dynamic method is specified
-------------------------------------------------------------------------
Key: WW-2186
URL: https://issues.apache.org/struts/browse/WW-2186
Project: Struts 2
Issue Type: Bug
Components: Dispatch
Affects Versions: 2.0.9
Environment: 2.0.9
struts.xml
...
<constant name="struts.mapper.idParameterName" value="objId"/>
...
<action name="customer/*" class="CustomerDataAction">
<result>/pages/listCustomer.jsp</result>
<result name="view">/pages/viewCustomer.jsp</result>
</action>
...
Reporter: Shane Frensley
Priority: Minor
According to the Restful2ActionMapper javadoc this pattern should work:
GET: /movie/Thrillers!edit => method="edit", id="Thrillers"
Using this pattern, the id never gets set. The reason is, that the action mapper only fixes up the id and actioname when the method specified is null (line 128).
I'm not sure what the plans are for this action mapper, but I really like it. I have temporarily fixed the issue (w/o understanding really very much about the design) with this patch:
c172: } else {
+173: if (idParameterName != null && lastSlashPos > -1) {
+174: String id = actionName.substring(lastSlashPos+1);
+175:
+176: if (mapping.getParams() == null) {
+177: mapping.setParams(new HashMap());
+178: }
+179: mapping.getParams().put(idParameterName, id);
+180: actionName = actionName.substring(0, lastSlashPos);
+181:
+182: }
Thanks for the great action mapper. I love it.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WW-2186) Restful2ActionMapper does not process
id when dynamic method is specified
Posted by "Tom Schneider (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_42474 ]
Tom Schneider commented on WW-2186:
-----------------------------------
Don is working on a Rest Plugin: http://cwiki.apache.org/S2PLUGINS/rest-plugin.html My guess is that this will better support rest style applications. I'm not sure how much support there will be for the old Restful2ActionMapper once Don's plugin is complete.
> Restful2ActionMapper does not process id when dynamic method is specified
> -------------------------------------------------------------------------
>
> Key: WW-2186
> URL: https://issues.apache.org/struts/browse/WW-2186
> Project: Struts 2
> Issue Type: Bug
> Components: Dispatch
> Affects Versions: 2.0.9
> Environment: 2.0.9
> struts.xml
> ...
> <constant name="struts.mapper.idParameterName" value="objId"/>
> ...
> <action name="customer/*" class="CustomerDataAction">
> <result>/pages/listCustomer.jsp</result>
> <result name="view">/pages/viewCustomer.jsp</result>
> </action>
> ...
> Reporter: Shane Frensley
> Priority: Minor
> Fix For: 2.1.1
>
>
> According to the Restful2ActionMapper javadoc this pattern should work:
> GET: /movie/Thrillers!edit => method="edit", id="Thrillers"
> Using this pattern, the id never gets set. The reason is, that the action mapper only fixes up the id and actioname when the method specified is null (line 128).
> I'm not sure what the plans are for this action mapper, but I really like it. I have temporarily fixed the issue (w/o understanding really very much about the design) with this patch:
> c172: } else {
> +173: if (idParameterName != null && lastSlashPos > -1) {
> +174: String id = actionName.substring(lastSlashPos+1);
> +175:
> +176: if (mapping.getParams() == null) {
> +177: mapping.setParams(new HashMap());
> +178: }
> +179: mapping.getParams().put(idParameterName, id);
> +180: actionName = actionName.substring(0, lastSlashPos);
> +181:
> +182: }
> Thanks for the great action mapper. I love it.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (WW-2186) Restful2ActionMapper does not process id
when dynamic method is specified
Posted by "Don Brown (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2186?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Don Brown resolved WW-2186.
---------------------------
Resolution: Fixed
Assignee: Don Brown
Fixed, thanks for the suggestion.
> Restful2ActionMapper does not process id when dynamic method is specified
> -------------------------------------------------------------------------
>
> Key: WW-2186
> URL: https://issues.apache.org/struts/browse/WW-2186
> Project: Struts 2
> Issue Type: Bug
> Components: Dispatch Filter
> Affects Versions: 2.0.9
> Environment: 2.0.9
> struts.xml
> ...
> <constant name="struts.mapper.idParameterName" value="objId"/>
> ...
> <action name="customer/*" class="CustomerDataAction">
> <result>/pages/listCustomer.jsp</result>
> <result name="view">/pages/viewCustomer.jsp</result>
> </action>
> ...
> Reporter: Shane Frensley
> Assignee: Don Brown
> Priority: Minor
> Fix For: 2.1.1
>
>
> According to the Restful2ActionMapper javadoc this pattern should work:
> GET: /movie/Thrillers!edit => method="edit", id="Thrillers"
> Using this pattern, the id never gets set. The reason is, that the action mapper only fixes up the id and actioname when the method specified is null (line 128).
> I'm not sure what the plans are for this action mapper, but I really like it. I have temporarily fixed the issue (w/o understanding really very much about the design) with this patch:
> c172: } else {
> +173: if (idParameterName != null && lastSlashPos > -1) {
> +174: String id = actionName.substring(lastSlashPos+1);
> +175:
> +176: if (mapping.getParams() == null) {
> +177: mapping.setParams(new HashMap());
> +178: }
> +179: mapping.getParams().put(idParameterName, id);
> +180: actionName = actionName.substring(0, lastSlashPos);
> +181:
> +182: }
> Thanks for the great action mapper. I love it.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WW-2186) Restful2ActionMapper does not process id
when dynamic method is specified
Posted by "Don Brown (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2186?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Don Brown updated WW-2186:
--------------------------
Fix Version/s: (was: 2.0.11)
2.0.12
> Restful2ActionMapper does not process id when dynamic method is specified
> -------------------------------------------------------------------------
>
> Key: WW-2186
> URL: https://issues.apache.org/struts/browse/WW-2186
> Project: Struts 2
> Issue Type: Bug
> Components: Dispatch
> Affects Versions: 2.0.9
> Environment: 2.0.9
> struts.xml
> ...
> <constant name="struts.mapper.idParameterName" value="objId"/>
> ...
> <action name="customer/*" class="CustomerDataAction">
> <result>/pages/listCustomer.jsp</result>
> <result name="view">/pages/viewCustomer.jsp</result>
> </action>
> ...
> Reporter: Shane Frensley
> Priority: Minor
> Fix For: 2.0.12
>
>
> According to the Restful2ActionMapper javadoc this pattern should work:
> GET: /movie/Thrillers!edit => method="edit", id="Thrillers"
> Using this pattern, the id never gets set. The reason is, that the action mapper only fixes up the id and actioname when the method specified is null (line 128).
> I'm not sure what the plans are for this action mapper, but I really like it. I have temporarily fixed the issue (w/o understanding really very much about the design) with this patch:
> c172: } else {
> +173: if (idParameterName != null && lastSlashPos > -1) {
> +174: String id = actionName.substring(lastSlashPos+1);
> +175:
> +176: if (mapping.getParams() == null) {
> +177: mapping.setParams(new HashMap());
> +178: }
> +179: mapping.getParams().put(idParameterName, id);
> +180: actionName = actionName.substring(0, lastSlashPos);
> +181:
> +182: }
> Thanks for the great action mapper. I love it.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WW-2186) Restful2ActionMapper does not process id
when dynamic method is specified
Posted by "James Holmes (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2186?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James Holmes updated WW-2186:
-----------------------------
Flags: [Patch]
> Restful2ActionMapper does not process id when dynamic method is specified
> -------------------------------------------------------------------------
>
> Key: WW-2186
> URL: https://issues.apache.org/struts/browse/WW-2186
> Project: Struts 2
> Issue Type: Bug
> Components: Dispatch
> Affects Versions: 2.0.9
> Environment: 2.0.9
> struts.xml
> ...
> <constant name="struts.mapper.idParameterName" value="objId"/>
> ...
> <action name="customer/*" class="CustomerDataAction">
> <result>/pages/listCustomer.jsp</result>
> <result name="view">/pages/viewCustomer.jsp</result>
> </action>
> ...
> Reporter: Shane Frensley
> Priority: Minor
> Fix For: 2.0.12
>
>
> According to the Restful2ActionMapper javadoc this pattern should work:
> GET: /movie/Thrillers!edit => method="edit", id="Thrillers"
> Using this pattern, the id never gets set. The reason is, that the action mapper only fixes up the id and actioname when the method specified is null (line 128).
> I'm not sure what the plans are for this action mapper, but I really like it. I have temporarily fixed the issue (w/o understanding really very much about the design) with this patch:
> c172: } else {
> +173: if (idParameterName != null && lastSlashPos > -1) {
> +174: String id = actionName.substring(lastSlashPos+1);
> +175:
> +176: if (mapping.getParams() == null) {
> +177: mapping.setParams(new HashMap());
> +178: }
> +179: mapping.getParams().put(idParameterName, id);
> +180: actionName = actionName.substring(0, lastSlashPos);
> +181:
> +182: }
> Thanks for the great action mapper. I love it.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WW-2186) Restful2ActionMapper does not process id
when dynamic method is specified
Posted by "Don Brown (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2186?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Don Brown updated WW-2186:
--------------------------
Fix Version/s: 2.0.11
> Restful2ActionMapper does not process id when dynamic method is specified
> -------------------------------------------------------------------------
>
> Key: WW-2186
> URL: https://issues.apache.org/struts/browse/WW-2186
> Project: Struts 2
> Issue Type: Bug
> Components: Dispatch
> Affects Versions: 2.0.9
> Environment: 2.0.9
> struts.xml
> ...
> <constant name="struts.mapper.idParameterName" value="objId"/>
> ...
> <action name="customer/*" class="CustomerDataAction">
> <result>/pages/listCustomer.jsp</result>
> <result name="view">/pages/viewCustomer.jsp</result>
> </action>
> ...
> Reporter: Shane Frensley
> Priority: Minor
> Fix For: 2.0.11
>
>
> According to the Restful2ActionMapper javadoc this pattern should work:
> GET: /movie/Thrillers!edit => method="edit", id="Thrillers"
> Using this pattern, the id never gets set. The reason is, that the action mapper only fixes up the id and actioname when the method specified is null (line 128).
> I'm not sure what the plans are for this action mapper, but I really like it. I have temporarily fixed the issue (w/o understanding really very much about the design) with this patch:
> c172: } else {
> +173: if (idParameterName != null && lastSlashPos > -1) {
> +174: String id = actionName.substring(lastSlashPos+1);
> +175:
> +176: if (mapping.getParams() == null) {
> +177: mapping.setParams(new HashMap());
> +178: }
> +179: mapping.getParams().put(idParameterName, id);
> +180: actionName = actionName.substring(0, lastSlashPos);
> +181:
> +182: }
> Thanks for the great action mapper. I love it.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WW-2186) Restful2ActionMapper does not process
id when dynamic method is specified
Posted by "Don Brown (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_42475 ]
Don Brown commented on WW-2186:
-------------------------------
Yeah, I'm thinking about moving this class and several others into a legacy plugin, maybe for 2.2. If you are serious about rest, the rest plugin is a better way to go.
> Restful2ActionMapper does not process id when dynamic method is specified
> -------------------------------------------------------------------------
>
> Key: WW-2186
> URL: https://issues.apache.org/struts/browse/WW-2186
> Project: Struts 2
> Issue Type: Bug
> Components: Dispatch
> Affects Versions: 2.0.9
> Environment: 2.0.9
> struts.xml
> ...
> <constant name="struts.mapper.idParameterName" value="objId"/>
> ...
> <action name="customer/*" class="CustomerDataAction">
> <result>/pages/listCustomer.jsp</result>
> <result name="view">/pages/viewCustomer.jsp</result>
> </action>
> ...
> Reporter: Shane Frensley
> Priority: Minor
> Fix For: 2.1.1
>
>
> According to the Restful2ActionMapper javadoc this pattern should work:
> GET: /movie/Thrillers!edit => method="edit", id="Thrillers"
> Using this pattern, the id never gets set. The reason is, that the action mapper only fixes up the id and actioname when the method specified is null (line 128).
> I'm not sure what the plans are for this action mapper, but I really like it. I have temporarily fixed the issue (w/o understanding really very much about the design) with this patch:
> c172: } else {
> +173: if (idParameterName != null && lastSlashPos > -1) {
> +174: String id = actionName.substring(lastSlashPos+1);
> +175:
> +176: if (mapping.getParams() == null) {
> +177: mapping.setParams(new HashMap());
> +178: }
> +179: mapping.getParams().put(idParameterName, id);
> +180: actionName = actionName.substring(0, lastSlashPos);
> +181:
> +182: }
> Thanks for the great action mapper. I love it.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.