If you want to show portlet only after user is login otherwise hide it.
Then use following code in your doView() method of a particular portlet.
ThemeDisplay themeDisplay= (ThemeDisplay)renderRequest.getAttribute(WebKeys.THEME_DISPLAY);
if(!themeDisplay.isSignedIn()){
renderRequest.setAttribute(WebKeys.PORTLET_CONFIGURATOR_VISIBILITY, Boolean.FALSE);
}
No comments:
Post a Comment