Foros de discusión
How to get plid of portlte if portlet is instanicable?
meera prince, modificado hace 11 años.
How to get plid of portlte if portlet is instanicable?
Liferay Legend Mensajes: 1111 Fecha de incorporación: 8/02/11 Mensajes recientes
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
Juhi Kumari, modificado hace 11 años.
RE: How to get plid of portlte if portlet is instanicable?
Expert Mensajes: 347 Fecha de incorporación: 12/12/11 Mensajes recientes
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
meera prince, modificado hace 11 años.
RE: How to get plid of portlte if portlet is instanicable?
Liferay Legend Mensajes: 1111 Fecha de incorporación: 8/02/11 Mensajes recientes
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.
Jitendra Rajput, modificado hace 11 años.
RE: How to get plid of portlte if portlet is instanicable?
Liferay Master Mensajes: 875 Fecha de incorporación: 7/01/11 Mensajes recientes
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.
meera prince, modificado hace 11 años.
RE: How to get plid of portlte if portlet is instanicable?
Liferay Legend Mensajes: 1111 Fecha de incorporación: 8/02/11 Mensajes recientes
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
Jitendra Rajput, modificado hace 11 años.
RE: How to get plid of portlte if portlet is instanicable?
Liferay Master Mensajes: 875 Fecha de incorporación: 7/01/11 Mensajes recientes
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.
meera prince, modificado hace 11 años.
RE: How to get plid of portlte if portlet is instanicable?
Liferay Legend Mensajes: 1111 Fecha de incorporación: 8/02/11 Mensajes recientes
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.
Jitendra Rajput, modificado hace 11 años.
RE: How to get plid of portlte if portlet is instanicable?
Liferay Master Mensajes: 875 Fecha de incorporación: 7/01/11 Mensajes recientes
If you remove portlet from page then instance id will be changed ..
meera prince, modificado hace 11 años.
RE: How to get plid of portlte if portlet is instanicable?
Liferay Legend Mensajes: 1111 Fecha de incorporación: 8/02/11 Mensajes recientes
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.
Jitendra Rajput, modificado hace 11 años.
RE: How to get plid of portlte if portlet is instanicable?
Liferay Master Mensajes: 875 Fecha de incorporación: 7/01/11 Mensajes recientes
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
meera prince, modificado hace 11 años.
RE: How to get plid of portlte if portlet is instanicable?
Liferay Legend Mensajes: 1111 Fecha de incorporación: 8/02/11 Mensajes recientes
Ya your rite..
Thank you Jitendra Rajput
Thank you Jitendra Rajput