ypomonh,
You can also use the portlet tag library. Here is the simplest JSP with
a form in it. When the Save button is clicked it will call your
processAction() method.
<[EMAIL PROTECTED] contentType="text/html"%>
<[EMAIL PROTECTED] pageEncoding="UTF-8"%>
<%@ page import="javax.portlet.*"%>
<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
<portlet:defineObjects />
<form method="post" action="<portlet:actionURL/>">
<input type="text" maxlength="60" name="companyName"/>
<input type="submit" name="save" value="Save"/>
</form>
--
Michael Binette
Dennis Dam wrote:
the trick is to use createActionUrl() from the
javax.portlets.RenderResponse class, and set that value as the target
for your form. This will specifically send submit the form values to
your portlet, and you can handle them in the processAction() method of
the portlet.
Actually I couldn't find a form examplee myself, but it's quite
straightforward if you know something about html forms..
ypomonh wrote:
I have written my first "Hello World" portlet and I'm just trying to
figure out how to hadle form posts, but I can't find a simple example
on how to:
print a form (doView) ---> post to the same portlet ---> do
something with the data.
Is there somewhere a simple example with forms..?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]