Reputation: 391
How can I get portlet id in jsp page of it's configuration portlet?
From the level of specific portlet I can call in .jsp page:
String portletId = themeDisplay.getPortletDisplay().getId();
How can I get that id in configuration portlet's jsp?
Upvotes: 0
Views: 1865
Reputation: 413
hello you can try this :
String portletId = themeDisplay.getPortletDisplay().getId();
String portletName = themeDisplay.getPortletDisplay().getPortletName();
String portletInstanceId = themeDisplay.getPortletDisplay().getInstanceId();
Don't forget:
<% ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY);
themeDisplay.getUser().getScreenName(); %>
Upvotes: 0
Reputation: 3865
If I understood you correctly this should give you portletId
final String portletResource = ParamUtil.getString(request, "portletResource");
final String portletId = PortletConstants.getRootPortletId(portletResource);
Upvotes: 1