掲示板
How to get plid of portlte if portlet is instanicable?
11年前 に meera prince によって更新されました。
How to get plid of portlte if portlet is instanicable?
Liferay Legend 投稿: 1111 参加年月日: 11/02/08 最新の投稿
Hi All ,
I want know the plid of portlet. here my portlet is istanciable.
i want create some url dyanamically from plid . to get plid dynamically i need to pass PortletId. But my portlet is instanciable.
How to get url of portlet dynamically ?
Regards,
Meera Prince
I want know the plid of portlet. here my portlet is istanciable.
i want create some url dyanamically from plid . to get plid dynamically i need to pass PortletId. But my portlet is instanciable.
How to get url of portlet dynamically ?
Regards,
Meera Prince
11年前 に Juhi Kumari によって更新されました。
RE: How to get plid of portlte if portlet is instanicable?
Expert 投稿: 347 参加年月日: 11/12/12 最新の投稿
Hi,
Using themeDisplay object you can get it.
It will return Id of portlet like
Receiver_WAR_Receiverportlet_INSTANCE_Cqz8
So in every instance of your portlet you will get dynamic portlet id with instance id .
Regards
Juhi
Using themeDisplay object you can get it.
themeDisplay.getPortletDisplay().getId()
It will return Id of portlet like
Receiver_WAR_Receiverportlet_INSTANCE_Cqz8
So in every instance of your portlet you will get dynamic portlet id with instance id .
Regards
Juhi
11年前 に meera prince によって更新されました。
RE: How to get plid of portlte if portlet is instanicable?
Liferay Legend 投稿: 1111 参加年月日: 11/02/08 最新の投稿
Hi thank you for reply.
but here i want another portletDisplay object not current portletDisplay objet.
my intention is from portlet id i want get PortletDisplay object.
but here i want another portletDisplay object not current portletDisplay objet.
my intention is from portlet id i want get PortletDisplay object.
11年前 に Jitendra Rajput によって更新されました。
RE: How to get plid of portlte if portlet is instanicable?
Liferay Master 投稿: 875 参加年月日: 11/01/07 最新の投稿
Plid you can also get it by passing friendly URL in LayoutLocalServiceUtil.getFriendlyURLLayout method . Once you have Layout object you can easily get plid from it.
11年前 に meera prince によって更新されました。
RE: How to get plid of portlte if portlet is instanicable?
Liferay Legend 投稿: 1111 参加年月日: 11/02/08 最新の投稿
Hi Jitendra Rajput
Here i don't know where my portlet is placed means which layout my portlet available. i don't know the any information related to layout.
i just know only portlet id but my portlet is instanciable.
Regards,
Meera Prince
Here i don't know where my portlet is placed means which layout my portlet available. i don't know the any information related to layout.
i just know only portlet id but my portlet is instanciable.
Regards,
Meera Prince
11年前 に Jitendra Rajput によって更新されました。
RE: How to get plid of portlte if portlet is instanicable?
Liferay Master 投稿: 875 参加年月日: 11/01/07 最新の投稿
Did you tried by using below method from PortalUtil. ?
PortalUtil.getPlidFromPortletId(long groupId, String portletId)
1) Try without passing instance id in portlet id (portlet_WAR_name)
2) Try by passing portlet id along with instance details.
PortalUtil.getPlidFromPortletId(long groupId, String portletId)
1) Try without passing instance id in portlet id (portlet_WAR_name)
2) Try by passing portlet id along with instance details.
11年前 に meera prince によって更新されました。
RE: How to get plid of portlte if portlet is instanicable?
Liferay Legend 投稿: 1111 参加年月日: 11/02/08 最新の投稿
HI Jitendra Rajput,
I tried that one. but in that i should pass PortletId that append with instance key. but here my question is i know portlet id and i can make instance id always same.
some time i delete portlet and i placed new one.
I tried that one. but in that i should pass PortletId that append with instance key. but here my question is i know portlet id and i can make instance id always same.
some time i delete portlet and i placed new one.
11年前 に Jitendra Rajput によって更新されました。
RE: How to get plid of portlte if portlet is instanicable?
Liferay Master 投稿: 875 参加年月日: 11/01/07 最新の投稿
If you remove portlet from page then instance id will be changed ..
11年前 に meera prince によって更新されました。
RE: How to get plid of portlte if portlet is instanicable?
Liferay Legend 投稿: 1111 参加年月日: 11/02/08 最新の投稿
ya you are rite that is my problem. if portlet is non instancable portlet id always same until i change in portlet.xml.
my requirement is i am doing some thing in one portlet after complistion of this i need to navidate to other portlet that is in diffrent layout. here i don't know this layout id and i know only portletId but my portlet is instanciable so i unable to find instance string.
my requirement is i am doing some thing in one portlet after complistion of this i need to navidate to other portlet that is in diffrent layout. here i don't know this layout id and i know only portletId but my portlet is instanciable so i unable to find instance string.
11年前 に Jitendra Rajput によって更新されました。
RE: How to get plid of portlte if portlet is instanicable?
Liferay Master 投稿: 875 参加年月日: 11/01/07 最新の投稿
As per my knowledge there can be 2 option .
1) Either remember friendly URL for layout
2) Make your portlet non instanciable
Update me if you know get better solution for your problem
1) Either remember friendly URL for layout
2) Make your portlet non instanciable
Update me if you know get better solution for your problem
11年前 に meera prince によって更新されました。
RE: How to get plid of portlte if portlet is instanicable?
Liferay Legend 投稿: 1111 参加年月日: 11/02/08 最新の投稿
Ya your rite..
Thank you Jitendra Rajput
Thank you Jitendra Rajput