Fórum

ProcessAction() is not getting invoked

Prasanth V, modificado 12 Anos atrás.

ProcessAction() is not getting invoked

New Member Mensagem: 1 Data de Entrada: 26/03/12 Postagens Recentes
Hi,

I am not able to call the ProcessAction method on submitting the Form.
when i click on <a> tag process action is called. But when i click on submit it is not calling processAction() method, rather its calling the doView() method.

I am constructing the URL as below in my jsp:-
<liferayext:actionURL var="submitMessage" plid="23442" portletName="ModifyMessagePortlet">
<portlet:param name="msgId" value="<%=strMsgId%>" />
</liferayext:actionURL>

Please kindly suggest how to invoke the ProcessAction() method.
thumbnail
Juhi Kumari, modificado 12 Anos atrás.

RE: ProcessAction() is not getting invoked

Expert Postagens: 347 Data de Entrada: 12/12/11 Postagens Recentes
Hi Prasanth,
Check this code
<portlet:actionurl var="submitURL">
	<portlet:param name="cmd" value="submitForm"></portlet:param>
</portlet:actionurl>
<form name="fm" method="post" action="<%= submitURL.toString() %>">
.
.
<input type="submit" value="Submit">
</form>

Now create submitForm(ActionRequest req, ActionResponse res) in your action class.

Regards
Juhi