Montag, 27. Juli 2009

How to access ThemeDisplay from a bean in liferay?



public ThemeDisplay getThemeDisplay(){
FacesContext context = FacesContext.getCurrentInstance();
PortletRequest portletRequest = (PortletRequest)context.getExternalContext().getRequest();
ThemeDisplay themeDisplay = (ThemeDisplay)portletRequest.getAttribute(WebKeys.THEME_DISPLAY);
return themeDisplay;
}

Keine Kommentare: