Fórumok

How to call the my own method directly with our touching the process action

Kiran Kumar Boyini, módosítva 11 év-val korábban

How to call the my own method directly with our touching the process action

Expert Bejegyzések: 287 Csatlakozás dátuma: 2011.06.02. Legújabb bejegyzések
Hi All,

I want to call the my own method directly with out touching the process action method in mvc portlet.

How it is possible ?

Regards,

Kiran.
thumbnail
David H Nebinger, módosítva 11 év-val korábban

RE: How to call the my own method directly with our touching the process ac

Liferay Legend Bejegyzések: 14919 Csatlakozás dátuma: 2006.09.02. Legújabb bejegyzések
Um, magic?

Seriously, how does any method get called? The call must originate somewhere...
Kiran Kumar Boyini, módosítva 11 év-val korábban

RE: How to call the my own method directly with our touching the process ac

Expert Bejegyzések: 287 Csatlakozás dátuma: 2011.06.02. Legújabb bejegyzések
Hi ,

in jsp code :


<portlet:actionurl var="edit" name="updateEmployee">
<portlet:param name="jspPage" value="/updateEmployee.jsp" />
</portlet:actionurl>


In controller :

public void updateEmployee(ActionRequest request, ActionResponse response){
	        	
	        	System.out.println("---This is inside the editProduct()-----");
	        	
	        	
	        }

Is it possible to call updateEmployee() directly using name=updateEmployee property of portlet action url directly or from processAction()
to this method i.e.,updateEmployee().
Regards,
Kiran.
Syed Ahmed, módosítva 11 év-val korábban

RE: How to call the my own method directly with our touching the process ac

New Member Bejegyzések: 7 Csatlakozás dátuma: 2009.09.23. Legújabb bejegyzések
In view.jsp

<portlet:actionURL var="actionURL" name="updateEmployee"></portlet:actionURL>

<form action="<%=actionURL%>">
// some html here
</form>
---------------------------
In Controller you can write this.

public class EmployeePortlet extends MVCPortlet {

public void updateEmployee(ActionRequest request, ActionResponse response) {
// do some action here
}
}