本文整理匯總了Java中org.apache.sling.api.SlingHttpServletRequest.getResourceBundle方法的典型用法代碼示例。如果您正苦於以下問題:Java SlingHttpServletRequest.getResourceBundle方法的具體用法?Java SlingHttpServletRequest.getResourceBundle怎麽用?Java SlingHttpServletRequest.getResourceBundle使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.sling.api.SlingHttpServletRequest
的用法示例。
在下文中一共展示了SlingHttpServletRequest.getResourceBundle方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: doGet
import org.apache.sling.api.SlingHttpServletRequest; //導入方法依賴的package包/類
@Override
protected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response)
throws ServletException, IOException {
SlingBindings bindings = (SlingBindings) request.getAttribute(SlingBindings.class.getName());
Page currentPage = (Page) bindings.get(WCMBindings.CURRENT_PAGE);
final Locale pageLocale = currentPage.getLanguage(true);
final ResourceBundle bundle = request.getResourceBundle(pageLocale);
i18n = new I18n(bundle);
SimpleDataSource countriesDataSource = new SimpleDataSource(buildCountriesList(request.getResourceResolver()).iterator());
request.setAttribute(DataSource.class.getName(), countriesDataSource);
}
開發者ID:Adobe-Marketing-Cloud,項目名稱:aem-sample-we-retail,代碼行數:12,代碼來源:CountriesFormOptionsDataSource.java