@Override public ResourceBundle getResourceBundle(Locale locale) { return wrapped.getResourceBundle(locale); }
/** * Gets the resource bundle for the given locale based on the resource * bundle defined in the deployment descriptor with * <code>resource-bundle</code> tag or the inlined resources defined in * the deployment descriptor. * * @return the resource bundle for the given locale */ public java.util.ResourceBundle getResourceBundle(java.util.Locale locale) { if (config == null) throw new java.lang.IllegalStateException( "Config is null, please ensure that your init(config) method calls super.init(config)"); return config.getResourceBundle(locale); }
/** * Used by the render method to get the title. * <p> * The default implementation gets the title from the ResourceBundle of the * PortletConfig of the portlet. The title is retrieved using the * 'javax.portlet.title' resource name. * <p> * Portlets can overwrite this method to provide dynamic titles (e.g. based * on locale, client, and session information). Examples are: * <UL> * <LI>language-dependent titles for multi-lingual portals</li> * <LI>shorter titles for WAP phones</li> * <LI>the number of messages in a mailbox portlet</li> * </UL> * * @return the portlet title for this window * @throws java.lang.IllegalStateException * if no portlet config object is available */ protected java.lang.String getTitle(RenderRequest request) { if (config == null) throw new java.lang.IllegalStateException( "Config is null, please ensure that your init(config) method calls super.init(config)"); return config.getResourceBundle(request.getLocale()).getString("javax.portlet.title"); }
/** * Gets the resource bundle for the given locale based on the * resource bundle defined in the deployment descriptor * with <code>resource-bundle</code> tag or the inlined resources * defined in the deployment descriptor. * * @return the resource bundle for the given locale */ public java.util.ResourceBundle getResourceBundle(java.util.Locale locale) { return config.getResourceBundle(locale); }
@Override public ResourceBundle getResourceBundle(Locale locale) { return (this.portletConfig != null ? this.portletConfig.getResourceBundle(locale) : null); }
public ResourceBundle resolveBundle(Locale locale) { return config.getResourceBundle(locale); } }
@Override public ResourceBundle getResourceBundle(Locale locale) { return (portletConfig != null ? portletConfig.getResourceBundle(locale) : null); }
public ResourceBundle resolveBundle(Locale locale) { return config.getResourceBundle(locale); } }
@Override public ResourceBundle getResourceBundle(Locale locale) { return wrappedPortletConfig.getResourceBundle(locale); }
public ResourceBundle getResourceBundle(Locale arg0) { return wrappedPortletConfig.getResourceBundle(arg0); }
public ResourceBundle getResourceBundle(Locale locale) { return (portletConfig != null ? portletConfig.getResourceBundle(locale) : null); }
public ResourceBundle getResourceBundle(Locale locale) { return (this.portletConfig != null ? this.portletConfig.getResourceBundle(locale) : null); }
/** * Gets the resource bundle for the given locale based on the resource * bundle defined in the deployment descriptor with * <code>resource-bundle</code> tag or the inlined resources defined in * the deployment descriptor. * * @return the resource bundle for the given locale */ public java.util.ResourceBundle getResourceBundle(java.util.Locale locale) { if (config == null) throw new java.lang.IllegalStateException( "Config is null, please ensure that your init(config) method calls super.init(config)"); return config.getResourceBundle(locale); }
public ResourceBundle getResourceBundle(Locale locale) { return getWrapped().getResourceBundle(locale); }
public ResourceBundle getResourceBundle(Locale locale) { return getWrapped().getResourceBundle(locale); }
/** * Gets the resource bundle for the given locale based on the resource * bundle defined in the deployment descriptor with * <code>resource-bundle</code> tag or the inlined resources defined in * the deployment descriptor. * * @param locale * the locale for which to retrieve the resource bundle * * @return the resource bundle for the given locale * */ public static java.util.ResourceBundle getResourceBundle( java.util.Locale locale) { PortletConfig portletConfig = getPortletConfig(); if (portletConfig == null) { throw new IllegalStateException("Cannot retrieve PortletConfig."); } return portletConfig.getResourceBundle(locale); }
/** * Used by the render method to get the title. * <p> * The default implementation gets the title from the ResourceBundle * of the PortletConfig of the portlet. The title is retrieved * using the 'javax.portlet.title' resource name. * <p> * Portlets can overwrite this method to provide dynamic * titles (e.g. based on locale, client, and session information). * Examples are: * <UL> * <LI>language-dependant titles for multi-lingual portals * <LI>shorter titles for WAP phones * <LI>the number of messages in a mailbox portlet * </UL> * * @return the portlet title for this window */ protected java.lang.String getTitle(RenderRequest request) { return config.getResourceBundle(request.getLocale()).getString("javax.portlet.title"); }
/** * Used by the render method to get the title. * <p> * The default implementation gets the title from the ResourceBundle of the * PortletConfig of the portlet. The title is retrieved using the * 'javax.portlet.title' resource name. * <p> * Portlets can overwrite this method to provide dynamic titles (e.g. based * on locale, client, and session information). Examples are: * <UL> * <LI>language-dependent titles for multi-lingual portals</li> * <LI>shorter titles for WAP phones</li> * <LI>the number of messages in a mailbox portlet</li> * </UL> * * @return the portlet title for this window * @throws java.lang.IllegalStateException * if no portlet config object is available */ protected java.lang.String getTitle(RenderRequest request) { if (config == null) throw new java.lang.IllegalStateException( "Config is null, please ensure that your init(config) method calls super.init(config)"); return config.getResourceBundle(request.getLocale()).getString("javax.portlet.title"); }
public static LocalizationContext getLocalizationContext(PageContext pc, String basename) { PortletConfig portletConfig = (PortletConfig) pc.getRequest().getAttribute("javax.portlet.config"); if (portletConfig == null) { return new LocalizationContext(); } else { PortletRequest portletRequest = (PortletRequest) pc.getRequest().getAttribute("javax.portlet.request"); return new LocalizationContext(portletConfig.getResourceBundle(portletRequest != null ? portletRequest.getLocale() : Locale.getDefault())); } }
public ResourceBundle getResourceBundle(Locale locale) { try { return getGenericPortlet().getResourceBundle(locale); } catch (PortletException e) { logger.warn(e); return config.getResourceBundle(locale); } }