Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7805291
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:10:41+00:00 2026-06-02T02:10:41+00:00

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

  • 0
<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 ??

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T02:10:44+00:00Added an answer on June 2, 2026 at 2:10 am

    you’ll need as many methods as you have action names:

    <portlet:actionURL name="addBook" var="addBookURL" />
    <aui:form action="<%= addBookURL.toString() %>" method="post"> ... </aui:form>
    
    <portlet:actionURL name="deleteBook" var="deleteBookURL" />
    <aui:form action="<%= deleteBookURL.toString() %>" method="post"> ... </aui:form>
    
    fyi: see what your actionURLs look like: <br/>
    <%=addBookURL.toString()%><br/>
    <%=deleteBookURL.toString()%><br/> 
    

    If you want to have less methods, but still have the action names, you can also override processAction(ActionRequest request, ActionResponse response) and handle the condition (action name) yourself. If one form does multiple actions, you can handle it in just one action and determine what content you get, e.g. which button has been pushed. Or use Javascript to set the form action URL on submit.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

<portlet:actionURL name=addBook var=addBookURL /> public void addBook(ActionRequest request, ActionResponse response) throws IOException, PortletException {
In a Portlet project (which uses spring 3.1) Consider the following form: <portlet:actionURL var=actionUrl
My jsp file contains the following code: <portlet:actionURL var=patientProfileURL name=editPatientProfile> <portlet:param name=jspPage value=/patientProfile.jsp />
Currently I generate an URL to a different portlet in this fashion: <liferay-portlet:actionURL var=custom
I have two portlets: Portlet-A and Portlet-B. Portlet-A make some data initialization and stores
I have a Portlet that contains a form. Now what I want to achieve
I have a portlet which has many rendering and action methods: @Controller @RequestMapping(VIEW) public
A pretty normal case: We have a 'portlet' composite component that has two states:
Short: (Portlet-)Container swallows Exception thrown by @PostConstruct method in backing bean. Is this behavior
I have a custom portlet which use 2 parameters I wrote in my portlet-conf.properties.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.