> -----Original Message-----
> From: Paul Hussein [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, November 19, 2003 2:02 PM
> To: Jetspeed User Mailing List
> Subject: RE: Passing parameters between portlets
>
>
> OK, thanks for the help.
>
>
> If I do it in Java, how can I grab the form data to send to
> the next portlet.
Use the rundata.getParameters().get* methods. Of course, you need to
know the form parameters' names.
>
> Do I have to post the form to myself (first portlet ) and
> then collect the form params somehow and then do the forward
> to the next portlet in Java. ????
Yes, that's what I was suggesting. There might be another way, but I
wouldn't know it :-)
The code might look something like this:
HashMap map = new HashMap();
map.put("param1", rundata.getParameters().getString("param1"));
map.put("param2", rundata.getParameters().getString("param2"));
ForwardService fs =
(ForwardService)ServiceUtil.getServiceByName(ForwardService.SERVICE_NAME
);
fs.forwardDynamic(rundata, "my_foward", map);
Oh yes, I almost forgot: the code needs to be executed by a Turbine
action, otherwise the forward won't work (it's too late in an action
executed by Jetspeed), so you have to explicitly call the action by
adding something like this to your form:
<input type="hidden" name="action" value="portlets.MySuperCoolAction">
Cheers
--
Holger Dewes
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]