This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Portals and Portlets and the fly likes Liferay Portlet: Form Actions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Portals and Portlets
Bookmark "Liferay Portlet: Form Actions" Watch "Liferay Portlet: Form Actions" New topic
Author

Liferay Portlet: Form Actions

Anthony Fernandez
Greenhorn

Joined: Sep 21, 2011
Posts: 8

Hi! I am an absolute beginner so please excuse my ignorance on a lot of stuff.

I am having a problem when it comes to developing a simple webform in liferay. I was trying to create it normally as in HTML. I put a normal file URL in the action attribute of the form tag. As you may have guessed it did not work at all. So I did a little searching and found out that you have to use tag in the action attribute of the form. What I am not understanding is where do you put the actual URL of the file in there?
This is what I have so far...


Where do you put the URL? How do you do this?

Thanks for any response.


Slowly but surely moving forward,
Anthony
Zandis Murāns
Ranch Hand

Joined: Aug 18, 2009
Posts: 174

Can you please explain bit more what do you mean by "Where do you put the URL?"?
Anthony Fernandez
Greenhorn

Joined: Sep 21, 2011
Posts: 8

I mean.... I don't have an idea how the "actionURL" works. Normally in the form tag, you put a file URL in the action attribute. But convention in portlets dictates I use the actionURL, instead. I'm sorry if I'm too ignorant of this, but have a difficulty understanding Java Web development (newbie programmer). Particularly on Liferay portlets.
Zandis Murāns
Ranch Hand

Joined: Aug 18, 2009
Posts: 174

Basicly, what tag "<portlet:actionURL />" do is - it prints out url for you'r portlet actions target.

You can go and test this in this way:
Anthony Fernandez
Greenhorn

Joined: Sep 21, 2011
Posts: 8

But where does the URL come from?
Zandis Murāns
Ranch Hand

Joined: Aug 18, 2009
Posts: 174

It comes from portlet API.
Anthony Fernandez
Greenhorn

Joined: Sep 21, 2011
Posts: 8

Oh... So in this case. It's from my "query.java" file? "query" is the name of my project.

So based on what I understand so far... it's supposed to be in the processAction?
The files I am modifying are the following:
- query_view.jsp - Automatically created. The view file.
- query.jsp - Created by me. This is what I want to be in the action attribute.
- query.java - Automatically created. This is where I saw the processAction.

I was trying to go for a simple user input webform that will go to my database.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Liferay Portlet: Form Actions
 
Similar Threads
liferay portlet - form parameters missing from request
portlet:actionURL-please help
encode namsepace in portlets
[liferay] My sample project
"struts_action" param inside renderURL tag for liferay's MVCPortlet