论坛

主页 » Liferay Portal » English » 3. Development

组合视图 统一视图 树状图
讨论主题 [ 上一个 | 下一个 ]
toggle
subrat kumar mishra
Ipc
2012年9月23日 下午12:26
答复

subrat kumar mishra

等级: New Member

帖子: 13

加入日期: 2012年9月3日

最近的帖子

pls send me a ipc session based exampple,i send two portlet pls cheak it reply me not getting th out put
附件: portlet a.docx (11.8k), portlet b.docx (11.5k)
Harish Kumar
RE: Ipc
2012年9月23日 下午10:24
答复

Harish Kumar

等级: Expert

帖子: 336

加入日期: 2010年7月31日

最近的帖子

Hi Subrat,

To share session attribute between different portlets you can make use of following property

1session.shared.attributes=COMPANY_,LIFERAY_SHARED_,org.apache.struts.action.LOCALE,PORTLET_RENDER_PARAMETERS_,PUBLIC_RENDER_PARAMETERS_POOL_,USER_


To set attribute -

1actionRequest.getPortletSession().setAttribute("LIFERAY_SHARED_session_attr", "Value",    PortletSession.APPLICATION_SCOPE);


To get attribute -

1actionRequest.getPortletSession().getAttribute("LIFERAY_SHARED_session_attr",PortletSession.APPLICATION_SCOPE)


HTH
Mazhar Alam
RE: Ipc
2012年9月24日 上午5:36
答复

Mazhar Alam

等级: Regular Member

帖子: 188

加入日期: 2011年11月25日

最近的帖子

Thats nice Subhash!!
David H Nebinger
RE: Ipc
2012年9月24日 上午6:20
答复

David H Nebinger

等级: Liferay Legend

帖子: 7253

加入日期: 2006年9月1日

最近的帖子

Subhash Pavuskar:
I hope This code may help you to understand IPC pls Find the attachment.


Please do not refer to this as IPC, because it's not.

IPC, in the portlet world, has a specific meaning and is based upon events and listeners at the portlet level.

All you've done in this code is set a variable in the portlet session's application scope. This is nothing more than sharing data, and is very much bad practice (want to change the portlet key? Have to touch all of your code that's using it).
Rahul Pande
RE: Ipc
2012年9月25日 上午4:52
答复

Rahul Pande

等级: Regular Member

帖子: 229

加入日期: 2010年7月6日

最近的帖子

David H Nebinger:
Subhash Pavuskar:
I hope This code may help you to understand IPC pls Find the attachment.


Please do not refer to this as IPC, because it's not.

IPC, in the portlet world, has a specific meaning and is based upon events and listeners at the portlet level.

All you've done in this code is set a variable in the portlet session's application scope. This is nothing more than sharing data, and is very much bad practice (want to change the portlet key? Have to touch all of your code that's using it).



I agree with David. This is just session sharing.

Please refer this link

NOTE : In the given link also they are considering session sharing as IPC, which is not correct.
subrat kumar mishra
RE: Ipc
2012年9月28日 上午8:24
答复

subrat kumar mishra

等级: New Member

帖子: 13

加入日期: 2012年9月3日

最近的帖子

Hello ur provided example is work within the same project two portlet communication,
But i need example of two portlets from different project communication
pls reply me
Jack Bakker
RE: Ipc
2012年9月29日 上午9:28
答复

Jack Bakker

等级: Liferay Master

帖子: 641

加入日期: 2010年1月3日

最近的帖子

If I remember correctly the Liferay in Action book introduces IPC rather well
Rehan Pathan
RE: Ipc
2013年5月13日 下午11:50
答复

Rehan Pathan

等级: New Member

帖子: 7

加入日期: 2013年1月30日

最近的帖子

hi,
Another example for ipc you can check on following
attuneinfocom/how-create-ipc-portlet-liferay-611-ga2-0