Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Ravi Kiran
Liferay 6: For every Method do i need to have a seperate actionURL
April 14, 2012 11:20 AM
Answer

Ravi Kiran

Rank: Junior Member

Posts: 53

Join Date: April 7, 2012

Recent Posts

<portlet:actionURL name="addBook" var="addBookURL" />
<aui:form action="<%= addBookURL.toString() %>" method="post">
I have these two methods inside the MVC Portlet class

public void addBook(ActionRequest request, ActionResponse response) {

}

public void deleteBook(ActionRequest request, ActionResponse response) {



}
In UI , The User can have different actions like Add , Delete Book

Now this is working fine with the method addBook , do i need to write a seperate portlet:actionURL and auiform also in UI for deleteBook Action ??

I am a new to Liferay , so please excuse the silly questions .

If it is so How can there be two forms in one page ??
Jelmer Kuperus
RE: Liferay 6: For every Method do i need to have a seperate actionURL
April 14, 2012 12:02 PM
Answer

Jelmer Kuperus

Rank: Liferay Legend

Posts: 1190

Join Date: March 10, 2010

Recent Posts

do i need to write a seperate portlet:actionURL and auiform also in UI for deleteBook Action ??


yes
Ravi Kiran
RE: Liferay 6: For every Method do i need to have a seperate actionURL
April 14, 2012 12:23 PM
Answer

Ravi Kiran

Rank: Junior Member

Posts: 53

Join Date: April 7, 2012

Recent Posts

jelmer kuperus:
do i need to write a seperate portlet:actionURL and auiform also in UI for deleteBook Action ??


yes


Thank you very much .
Hitoshi Ozawa
RE: Liferay 6: For every Method do i need to have a seperate actionURL
April 14, 2012 10:17 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7990

Join Date: March 23, 2010

Recent Posts

Liferay document "Developing a Portlet with Multiple Actions" available at the following page:

http://www.liferay.com/documentation/liferay-portal/6.1/development/-/ai/developing-a-portlet-with-multiple-actio-4