Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
Kiran Kumar Boyini
How to call the my own method directly with our touching the process action
5 marzo 2013 6.35
Risposta

Kiran Kumar Boyini

Punteggio: Expert

Messaggi: 274

Data di Iscrizione: 2 giugno 2011

Messaggi recenti

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.
David H Nebinger
RE: How to call the my own method directly with our touching the process ac
5 marzo 2013 6.41
Risposta

David H Nebinger

Punteggio: Liferay Legend

Messaggi: 6274

Data di Iscrizione: 1 settembre 2006

Messaggi recenti

Um, magic?

Seriously, how does any method get called? The call must originate somewhere...
Kiran Kumar Boyini
RE: How to call the my own method directly with our touching the process ac
6 marzo 2013 22.19
Risposta

Kiran Kumar Boyini

Punteggio: Expert

Messaggi: 274

Data di Iscrizione: 2 giugno 2011

Messaggi recenti

Hi ,

in jsp code :

1
2<portlet:actionURL  var="edit" name="updateEmployee">
3<portlet:param name="jspPage" value="/updateEmployee.jsp" />
4</portlet:actionURL>


In controller :
1
2public void updateEmployee(ActionRequest request, ActionResponse response){
3               
4                System.out.println("---This is inside the editProduct()-----");
5               
6               
7            }

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 Shabeer Ahmed
RE: How to call the my own method directly with our touching the process ac
6 marzo 2013 22.27
Risposta

Syed Shabeer Ahmed

Punteggio: New Member

Messaggi: 7

Data di Iscrizione: 23 settembre 2009

Messaggi recenti

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
}
}