| 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...
|
 |
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.
|
 |
 |
|
|
subject: Liferay Portlet: Form Actions
|
|
|