掲示板

How can call a portlet another portlet

11年前 に Nitesh Garg によって更新されました。

How can call a portlet another portlet

New Member 投稿: 3 参加年月日: 12/09/25 最新の投稿
Hi,

Is it possible to call a portlet from another portlet.
Consider a portlet A and i want when user clicks on 1 of the links in this portlet then a new portlet opens up in the same area on the page.

Is this possible. Please let me know asap.

Regards,
Nitesh
thumbnail
11年前 に Bart Simpson によって更新されました。

RE: How can call a portlet another portlet

Liferay Master 投稿: 522 参加年月日: 11/08/29 最新の投稿
Try considering IPC http://www.liferay.com/community/wiki/-/wiki/Main/Inter-portlet+communication
http://www.liferay.com/web/james.min/blog/-/blogs/241107
11年前 に Nitesh Garg によって更新されました。

RE: How can call a portlet another portlet

New Member 投稿: 3 参加年月日: 12/09/25 最新の投稿
Thanks Bart i will check these solution if they are able to solve my problem
11年前 に Nitesh Garg によって更新されました。

RE: How can call a portlet another portlet

New Member 投稿: 3 参加年月日: 12/09/25 最新の投稿
Can two portlet communicate each other if one portlet (reciever) is not added to any page on portal but is deployed on server
thumbnail
11年前 に André Bunse によって更新されました。

RE: How can call a portlet another portlet

Junior Member 投稿: 85 参加年月日: 12/03/16 最新の投稿
Nitesh Garg:
Can two portlet communicate each other if one portlet (reciever) is not added to any page on portal but is deployed on server

Hi Nitesh,

i don't think so, but why not adding this portlet on every page and simple hide it?
(can be done by individual theme and templates/portal_normal.vm)

For your first question take a look at "html/js/liferay/layout_configuration.js".
This JavaScript file shows how to manually invoke a portlet.

HTH
André
thumbnail
9年前 に Anil T によって更新されました。

RE: How can call a portlet another portlet

Expert 投稿: 313 参加年月日: 12/01/14 最新の投稿
Hi Nitesh,

Have you got the solution for this requirement ?
thumbnail
9年前 に Manali Lalaji によって更新されました。

RE: How can call a portlet another portlet

Expert 投稿: 362 参加年月日: 10/03/09 最新の投稿
Hi Anil,

Have you tried this?


PortletURL portletURL;
HttpServletRequest httpRequest = PortalUtil.getHttpServletRequest(portletRequest);  
httpRequest = PortalUtil.getOriginalServletRequest(httpRequest);
  
//Get layout id of another portlet   
long plid = PortalUtil.getPlidFromPortletId(themeDisplay.getScopeGroupId(), portletID);  
  
//Generate PortletUrl
portletURL = PortletURLFactoryUtil.create(httpRequest ,"helloWorld_WAR_HelloWorldPortlet", plid ,PortletRequest.RENDER_PHASE);

portletURL .setWindowState(LiferayWindowState.NORMAL);


This shall return you portletURL of another portlet.

HTH!
thumbnail
9年前 に Anil T によって更新されました。

RE: How can call a portlet another portlet

Expert 投稿: 313 参加年月日: 12/01/14 最新の投稿
Thanks Manali for reply. I have solved that with <liferay-portlet:actionURL portletName>. Its working for me.
9年前 に srinivasa rao によって更新されました。

RE: How can call a portlet another portlet

Regular Member 投稿: 189 参加年月日: 14/01/29 最新の投稿
Anil T:
Thanks Manali for reply. I have solved that with <liferay-portlet:actionURL portletName>. Its working for me.



Hi Anil,

Could you please explain me full steps how to do?
thumbnail
9年前 に Anil T によって更新されました。

RE: How can call a portlet another portlet

Expert 投稿: 313 参加年月日: 12/01/14 最新の投稿
Hi,

I have used below code in my second portlet to call first portlet.

<liferay-portlet:actionURL portletName="sampleportlet_WAR_sampleportlet" var="callURL">

When we pass this url into hyperlink/button and click on we will get the first sampleportlet.