Foren

Home » Liferay Portal » English » 3. Development

Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
Priya Pratheep
get portletid
16. Mai 2013 21:08
Antwort

Priya Pratheep

Rang: Junior Member

Nachrichten: 38

Eintrittsdatum: 13. März 2013

Neue Beiträge

Hi friends,

how to get portletid or portletname like mmmm_WAR_mmmm....

I tried String portletId = (String) req.getAttribute(WebKeys.PORTLET_ID); in public class ProjectReportPortlet extends GenericPortlet class but WebKeys can't recognized.I don't know what to include?

Even in ThemeDisplay themeDisplay= (ThemeDisplay)renderRequest.getAttribute(WebKeys.THEME_DISPLAY); too have WebKeys

Please help me to find our my portlet name.
Thanks in advance
Priya

Problem solved
http://www.liferay.com/community/forums/-/message_boards/message/12198734
Apoorva Prakash
RE: get portletid
16. Mai 2013 21:29
Antwort

Apoorva Prakash

Rang: Liferay Master

Nachrichten: 659

Eintrittsdatum: 15. Juni 2010

Neue Beiträge

Priya Pratheep:
Hi friends,

how to get portletid or portletname like mmmm_WAR_mmmm....

I tried String portletId = (String) req.getAttribute(WebKeys.PORTLET_ID); in public class ProjectReportPortlet extends GenericPortlet class but WebKeys can't recognized.I don't know what to include?

Even in ThemeDisplay themeDisplay= (ThemeDisplay)renderRequest.getAttribute(WebKeys.THEME_DISPLAY); too have WebKeys

Please help me to find our my portlet name.
Thanks in advance
Priya


try the following:

1String pid = themeDisplay.getPortletDisplay().getId();

HTH

Thanks and Regards,
Apoorva Prakash
Jitendra Rajput
RE: get portletid
16. Mai 2013 23:35
Antwort

Jitendra Rajput

Rang: Liferay Master

Nachrichten: 873

Eintrittsdatum: 7. Januar 2011

Neue Beiträge

You can also try with PortalUtil.getPortletId(request)