List of usage examples for com.liferay.portal.kernel.theme ThemeDisplay setLocale
public void setLocale(Locale locale)
From source file:com.liferay.calendar.util.test.CalendarUtilTest.java
License:Open Source License
protected ThemeDisplay createThemeDisplay() throws PortalException { ThemeDisplay themeDisplay = new ThemeDisplay(); Company company = CompanyLocalServiceUtil.getCompany(_group.getCompanyId()); themeDisplay.setCompany(company);//from w ww.ja va 2 s.c om themeDisplay.setLocale(LocaleUtil.getDefault()); themeDisplay.setScopeGroupId(_group.getGroupId()); themeDisplay.setPermissionChecker(PermissionThreadLocal.getPermissionChecker()); themeDisplay.setUser(_user); return themeDisplay; }
From source file:com.liferay.dynamic.data.mapping.form.web.internal.display.context.DDLFormDisplayContextTest.java
License:Open Source License
protected RenderRequest mockRenderRequest() { RenderRequest renderRequest = new MockRenderRequest(); ThemeDisplay themeDisplay = new ThemeDisplay(); themeDisplay.setLocale(LocaleUtil.SPAIN); renderRequest.setAttribute(WebKeys.THEME_DISPLAY, themeDisplay); return renderRequest; }