[
https://issues.apache.org/struts/browse/WW-1653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40008
]
Brent Flaten commented on WW-1653:
----------------------------------
It appears as though "specifying a method on a submit button" does now work.
But, specifying a method for an action on a link does not work.
<a href="<s:url action="ActionName" method="myMethod"/>">Click Me</a>
We are using liferay 4.1.2. Upon page creation, the url looks something like
this.
http://database:8080/c/portal/layout?p_l_id=PRI.15.2&p_p_id=SampleStruts2Portlet_WAR_samplestruts2portlet&p_p_action=0&p_p_state=normal&p_p_mode=view&p_p_col_id=&p_p_col_pos=0&p_p_col_count=0&_SampleStruts2Portlet_WAR_samplestruts2portlet_struts.portlet.mode=view&_SampleStruts2Portlet_WAR_samplestruts2portlet_struts.portlet.action=%2Fview%2FActionName
The parameter
'_SampleStruts2Portlet_WAR_samplestruts2portlet_struts.portlet.action'=%2Fview%2FActionName
and this link will not call the myMethod method, it will instead call the
exectue method of ActionName, however if we change the url manually to
http://database:8080/c/portal/layout?p_l_id=PRI.15.2&p_p_id=SampleStruts2Portlet_WAR_samplestruts2portlet&p_p_action=0&p_p_state=normal&p_p_mode=view&p_p_col_id=&p_p_col_pos=0&p_p_col_count=0&_SampleStruts2Portlet_WAR_samplestruts2portlet_struts.portlet.mode=view&_SampleStruts2Portlet_WAR_samplestruts2portlet_struts.portlet.action=%2Fview%2FActionName!myMethod,
it will call the myMethod method.
Thank you
> Can't specify method to call on action in portlet mode
> ------------------------------------------------------
>
> Key: WW-1653
> URL: https://issues.apache.org/struts/browse/WW-1653
> Project: Struts 2
> Issue Type: Bug
> Affects Versions: 2.0.3
> Reporter: Don Brown
> Assigned To: Don Brown
> Fix For: 2.0.3
>
>
> When you generate urls or specify a method on a submit button, the portlet
> dispatcher doesn't know how to parse the method name out of the "url".
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.