Example usage for com.liferay.portal.kernel.theme ThemeDisplay setLocale

List of usage examples for com.liferay.portal.kernel.theme ThemeDisplay setLocale

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.theme ThemeDisplay setLocale.

Prototype

public void setLocale(Locale locale) 

Source Link

Usage

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;
}