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 "Mani, Bharanidharan" <ma...@scr.siemens.com> on 2002/05/10 19:07:07 UTC
interportlet communication
Hi ,
I have two requirement. 1. I need to communication between two
portlet. 2. When i click on a link on one portlet, it should display the
content of the link in the same portlet(i.e. refreshing the same portlet).
I read that you can communicate between two portlets by sharing the session
object. But i am not sure how i should proceed.. can someone tell me how to
interportlet communication.
thanks
bharani
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: interportlet communication
Posted by Stefan Kuhn <sk...@ice.mpg.de>.
Hi bharani,
I hope I can shed some light on the first topic, interportlet communication.
If the portlet is a java portlet, i. e. a class implementing
org.apache.jetspeed.portal.portlet, then you have in the getContent(RunData
rd) method the runData object. This contains everything you need, e. g.
session, servletRequest (and therefore the parameters from forms submitted by
the user) and servletResponse. So you can for example have a form in one
portlet and displaying the result of some action like a database query in the
other.
I don't know what it is like with other portlets (don't use them), but it
should be similar in a JSP-Portlet. HTML portlets should be static anyway.
HTH
Stefan
Am Freitag, 10. Mai 2002 19:07 schrieben Sie:
> Hi ,
> I have two requirement. 1. I need to communication between two
> portlet. 2. When i click on a link on one portlet, it should display the
> content of the link in the same portlet(i.e. refreshing the same portlet).
>
> I read that you can communicate between two portlets by sharing the session
> object. But i am not sure how i should proceed.. can someone tell me how to
> interportlet communication.
>
>
> thanks
> bharani
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: interportlet communication
Posted by Paul Spencer <pa...@apache.org>.
Mani, Bharanidharan wrote:
> Hi ,
> I have two requirement. 1. I need to communication between two
> portlet.
I have see this question before, my standard response is "what do you
mean by "communication". If you mean portlet A will generate some data
base on a request and return content to the user AND send data to
portlet B via ???( mailbox/named pipe/database), then I am not sure you
can or should count on the order the content is retrieved from each
portlet.
> 2. When i click on a link on one portlet, it should display the
> content of the link in the same portlet(i.e. refreshing the same portlet).
I portlet should be able to generate a link to itself. See the JSLink
(org.apache.jetspeed.util.template.JetspeedLink) examples.
>
> I read that you can communicate between two portlets by sharing the session
> object. But i am not sure how i should proceed.. can someone tell me how to
> interportlet communication.
You can "share" date via the session, rundata.getUser().get/setTemp().
but again if this is dependent on the order content is retrieved from
the portlets within the same request, you are inviting trouble.
>
>
> thanks
> bharani
>
Paul Spencer
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>