Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
R K
get the portletId of portlet which is not yet displayed
July 7, 2010 2:02 AM
Answer

R K

Rank: Junior Member

Posts: 43

Join Date: May 24, 2010

Recent Posts

Hi,

usually portlet Id gets assigned to a portlet once the portlet is invoked to be displayed on the page.
When the portlet is under add application is it possible to get the portletID of that particular portlet.?

Thanks
sridhar iyer
RE: get the portletId of portlet which is not yet displayed
July 14, 2010 3:18 AM
Answer

sridhar iyer

Rank: Junior Member

Posts: 57

Join Date: February 27, 2009

Recent Posts

R K:
Hi,

usually portlet Id gets assigned to a portlet once the portlet is invoked to be displayed on the page.
When the portlet is under add application is it possible to get the portletID of that particular portlet.?

Thanks


If the portlet is not instanceable ("<instanceable>false</instanceable>"in liferay-portlet.xml) you will have the same portlet id throughout all the pages. If it is instanceable you will have different id.
sibi thomas
RE: get the portletId of portlet which is not yet displayed
July 14, 2010 4:16 AM
Answer

sibi thomas

Rank: Junior Member

Posts: 44

Join Date: May 30, 2008

Recent Posts

Hi RK

You can get portlet-id from the your portlet. you can refer below code

1String portletId = PortalUtil.getPortletId(request);


/sibi