Foren

Inter portlet communication

chinnari k, geändert vor 11 Jahren.

Inter portlet communication

New Member Beiträge: 5 Beitrittsdatum: 19.12.12 Neueste Beiträge
Hi,
Can any one please send me an example which will satisy the following requirements.??
Iam using liferay 6.1 with apache tomcat 7.0.
I have created two portlets on a same page. I displayed list of options on one portlet. when i click on any particular option the information about that particular option should be display on second portlet. This should happen with all the options. For that what i have to do, Please give me solution, It's urgent.............

Thanks.
thumbnail
David H Nebinger, geändert vor 11 Jahren.

RE: Inter portlet communication

Liferay Legend Beiträge: 14915 Beitrittsdatum: 02.09.06 Neueste Beiträge
There are already examples in doing standard portlet IPC. You can check the wiki. Liferay in Action is a great resource too.
chinnari k, geändert vor 11 Jahren.

RE: Inter portlet communication

New Member Beiträge: 5 Beitrittsdatum: 19.12.12 Neueste Beiträge
Hi David,
Thank you for your suggestion.

Is there any way to display a set of images on the right side when we click something on the left side that uses inter portlet communication using events. I am able to display text but i am not able to display images using the above concept. Can you please suggest me...


Thanks
thumbnail
Bart Simpson, geändert vor 11 Jahren.

RE: Inter portlet communication

Liferay Master Beiträge: 522 Beitrittsdatum: 29.08.11 Neueste Beiträge
You have to retrieve the image and form the url as present in the document library portlet, then it should be possible to display it. What is the problem you are facing? Any exceptions? Can you share the code?
chinnari k, geändert vor 11 Jahren.

RE: Inter portlet communication

New Member Beiträge: 5 Beitrittsdatum: 19.12.12 Neueste Beiträge
Thanks for the quick response.
I want to send a set of images as a payload from sender portlet to listener portlet. Is there any data type for specifying the images?
thumbnail
Bart Simpson, geändert vor 11 Jahren.

RE: Inter portlet communication

Liferay Master Beiträge: 522 Beitrittsdatum: 29.08.11 Neueste Beiträge
I want to send a set of images as a payload from sender portlet to listener portlet.

Is there any reason you want to send image as the payload. Image is just the resource, why just not send the link. How will it benefit to send the image itself. I am just trying to understand the requirement you have, so I can try to give you a better option
chinnari k, geändert vor 11 Jahren.

RE: Inter portlet communication

New Member Beiträge: 5 Beitrittsdatum: 19.12.12 Neueste Beiträge
I am using the below code for sending text from sender portlet to listener portlet.

public void sendEvent(ActionRequest actionRequest,
ActionResponse actionResponse) {
QName qname = new QName(
"http:your.private.namespace.com/yourEvent",
"message");
actionResponse.setEvent(qname,"Hello World");
return;
}

In the above code, instead of "Hello World" message, i want to send a set of images from sender portlet to listener portlet. How can I do that? Can you please help me...
Both my sender and listener portlets are extending Generic Portlet.

Thanks
chinnari k, geändert vor 11 Jahren.

RE: Inter portlet communication

New Member Beiträge: 5 Beitrittsdatum: 19.12.12 Neueste Beiträge
Hi Bart,
Can you please help me out in solving the issue above.

Thanks
thumbnail
Jay Trivedi, geändert vor 11 Jahren.

RE: Inter portlet communication

Regular Member Beiträge: 109 Beitrittsdatum: 24.11.12 Neueste Beiträge
Hey Chinnari,

If your hello world IPC Portlet works fine than you can pass a particular text from your portlet- 1 to portlet-2 and based on that text comparision you can get the list of images on portlet-2. I hope this makes things little clear.Share code file to get it modified.

Regards Jay.