留言板

How to get Portlet Id using the Portlet Name in Liferay

Maria Awaria,修改在9 年前。

How to get Portlet Id using the Portlet Name in Liferay

New Member 发布: 1 加入日期: 14-8-14 最近的帖子
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,修改在9 年前。

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

Liferay Legend 帖子: 14919 加入日期: 06-9-2 最近的帖子
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.