Foros de discusión

How to get Portlet Id using the Portlet Name in Liferay

Maria Awaria, modificado hace 9 años.

How to get Portlet Id using the Portlet Name in Liferay

New Member Mensaje: 1 Fecha de incorporación: 14/08/14 Mensajes recientes
Hi :-)

I have a requirement of getting resource permission using portlet name.
I will have the name of the portlet not the Id.

Resource Permission name for a portlet is that portlet's Id. I checked the Portlet table, it has only the Id and other info. Where will be the other attributes of portlet saved?.

Is there a way I can get portlet's Id by using portlet's name. I have a workaroud to get all portlets and compare, but if I can directly get portlet's Id using portlet's name it will be helpful.

Its urgent.. if anyone knows pls reply back, it will be of great help.

Thanks in Advance
thumbnail
David H Nebinger, modificado hace 9 años.

RE: How to get Portlet Id using the Portlet Name in Liferay

Liferay Legend Mensajes: 14914 Fecha de incorporación: 2/09/06 Mensajes recientes
It's not really possible. For an instantiable portlet, a single portlet name can have multiple instances all with different plids.

What you need to do is find the plid for the portlet you want to update.