You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by David Sean Taylor <da...@bluesunrise.com> on 2003/01/06 07:03:12 UTC

Re: Passing data between portlets

On Monday, December 30, 2002, at 07:46  AM, Peeples, Kenny wrote:

> I want to find the best way to pass data from one portlet to another.
> Currently we are trying to access the parent document javascript 
> functions
> from within the iframe document.  We are getting permission denied from
> within the iframe document when we try to access parent through the
> javascript.  Does anyone know how to get around the permission denied 
> error
> or know of a better way to pass a form field value from one portlet to
> another so that the second portlet is refreshed using the form field 
> value?
> The second portlet is depend on a value entered into the first portlet.
> Each portlet could be running on a different server and using the 
> passed
> value to grab data through a JSP.
>
>
>
> Example: Portlet A has a text field and submit button.  The text field
> accepts a patient ID and when submitted portlet B receives the value.  
> Then
> portlet B which is a JSP on a different application server pulls the
> demographic data for the patient from the patient processing system.
>

Why not simply call the action of Portlet B from within the action of 
Portlet A.

Action actionB = 
ActionLoader.getInstance().getInstance("portlets.PortletActionB");
actionB.doSave(rundata, context);

If you need to pass parameters, just add them to the request with 
setAttribute

As for your last statement "each portlet could be running on a 
different server",
Jetspeed doesn't currently support remote portlet invocation.
There is a committee at Oasis working on a remote portal spec. called 
WSRP.

If you need to communicate with a remote JSP application, you could 
write a service or customization of the WebPagePortlet2 to do so.
This portlet or service could also be tied into Portlet A, so that when 
the patient ID is submitted, and the action for Portlet A is invoked, 
then the call to the remote JSP would be submitted with the patient id 
posted.
Since the remote JSP probably returns HTML, it will need to parsed, and 
that is where WebPagePortlet2 comes in.

--
David Sean Taylor
Bluesunrise Software
david@bluesunrise.com
+01 707 773-4646




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>