use of javax.portlet.PortletConfig in project acs-community-packaging by Alfresco.
the class AlfrescoFacesPortlet method getFacesContext.
/**
* Initializes a new faces context using the portlet objects from a 'wrapped' servlet request.
*
* @param request
* the servlet request
* @return the faces context
*/
public static FacesContext getFacesContext(ServletRequest request) {
PortletRequest portletReq = (PortletRequest) request.getAttribute("javax.portlet.request");
PortletResponse portletRes = (PortletResponse) request.getAttribute("javax.portlet.response");
PortletConfig portletConfig = (PortletConfig) request.getAttribute("javax.portlet.config");
return FacesHelper.getFacesContext(portletReq, portletRes, portletConfig.getPortletContext());
}
use of javax.portlet.PortletConfig in project liferay-ide by liferay.
the class GadgetPortlet method getGadget.
@Override
protected Gadget getGadget(RenderRequest renderRequest) throws Exception {
ThemeDisplay themeDisplay = (ThemeDisplay) renderRequest.getAttribute(WebKeys.THEME_DISPLAY);
PortletConfig portletConfig = getPortletConfig();
return ShindigUtil.getGadget(portletConfig.getPortletName(), themeDisplay.getCompanyId());
}
use of javax.portlet.PortletConfig in project liferay-ide by liferay.
the class LiferayPortlet method translate.
protected String translate(PortletRequest portletRequest, String key, Object[] arguments) {
PortletConfig portletConfig = (PortletConfig) portletRequest.getAttribute(JavaConstants.JAVAX_PORTLET_CONFIG);
ThemeDisplay themeDisplay = (ThemeDisplay) portletRequest.getAttribute(WebKeys.THEME_DISPLAY);
return LanguageUtil.format(portletConfig, themeDisplay.getLocale(), key, arguments);
}
use of javax.portlet.PortletConfig in project liferay-ide by liferay.
the class LiferayPortlet method translate.
protected String translate(PortletRequest portletRequest, String key) {
PortletConfig portletConfig = (PortletConfig) portletRequest.getAttribute(JavaConstants.JAVAX_PORTLET_CONFIG);
ThemeDisplay themeDisplay = (ThemeDisplay) portletRequest.getAttribute(WebKeys.THEME_DISPLAY);
return LanguageUtil.get(portletConfig, themeDisplay.getLocale(), key);
}
use of javax.portlet.PortletConfig in project liferay-ide by liferay.
the class LiferayPortlet method translate.
protected String translate(PortletRequest portletRequest, String key, Object argument) {
PortletConfig portletConfig = (PortletConfig) portletRequest.getAttribute(JavaConstants.JAVAX_PORTLET_CONFIG);
ThemeDisplay themeDisplay = (ThemeDisplay) portletRequest.getAttribute(WebKeys.THEME_DISPLAY);
return LanguageUtil.format(portletConfig, themeDisplay.getLocale(), key, argument);
}
Aggregations