简体   繁体   中英

How to figure out if there is a portlet on the portal page?

I need to run some cron job for all groups that are organisations depending on the portlet group scope preferences.

If I add portlet to the organisation page, set some preferences to portlet and then remove the portlet, preferences are not removed and cron job continues to perform task.

Is there any way to figure out that a portlet was removed or that there is no portlet with concrete id connected to particular groupId ?

Environment: Liferay 6.1

您可以使用PortalUtil.getPlidFromPortletId(long groupId, String portletId)将返回plid该门户上,或0 ,如果它不是任何页面上。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM