Foros de discusión

Inter portlet communication

chinnari k, modificado hace 11 años.

Inter portlet communication

New Member Mensajes: 5 Fecha de incorporación: 19/12/12 Mensajes recientes
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, modificado hace 11 años.

RE: Inter portlet communication

Liferay Legend Mensajes: 14919 Fecha de incorporación: 2/09/06 Mensajes recientes
There are already examples in doing standard portlet IPC. You can check the wiki. Liferay in Action is a great resource too.
chinnari k, modificado hace 11 años.

RE: Inter portlet communication

New Member Mensajes: 5 Fecha de incorporación: 19/12/12 Mensajes recientes
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, modificado hace 11 años.

RE: Inter portlet communication

Liferay Master Mensajes: 522 Fecha de incorporación: 29/08/11 Mensajes recientes
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, modificado hace 11 años.

RE: Inter portlet communication

New Member Mensajes: 5 Fecha de incorporación: 19/12/12 Mensajes recientes
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, modificado hace 11 años.

RE: Inter portlet communication

Liferay Master Mensajes: 522 Fecha de incorporación: 29/08/11 Mensajes recientes
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, modificado hace 11 años.

RE: Inter portlet communication

New Member Mensajes: 5 Fecha de incorporación: 19/12/12 Mensajes recientes
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, modificado hace 11 años.

RE: Inter portlet communication

New Member Mensajes: 5 Fecha de incorporación: 19/12/12 Mensajes recientes
Hi Bart,
Can you please help me out in solving the issue above.

Thanks
thumbnail
Jay Trivedi, modificado hace 11 años.

RE: Inter portlet communication

Regular Member Mensajes: 109 Fecha de incorporación: 24/11/12 Mensajes recientes
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.