本文整理了Java中javax.faces.application.Application.getMessageBundle()
方法的一些代码示例,展示了Application.getMessageBundle()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Application.getMessageBundle()
方法的具体详情如下:
包路径:javax.faces.application.Application
类名称:Application
方法名:getMessageBundle
Application.getMessageBundle介绍
[英]Return the fully qualified class name of the ResourceBundle
to be used for JavaServer Faces messages for this application. If not explicitly set, null
is returned.
[中]返回用于此应用程序的JavaServer Faces消息的ResourceBundle
的完全限定类名。如果未显式设置,则返回null
。
代码示例
代码示例来源:origin: wildfly/wildfly
@Override
public String getMessageBundle() {
return delegate().getMessageBundle();
}
代码示例来源:origin: primefaces/primefaces
FacesContext facesCOntext= FacesContext.getCurrentInstance();
Application application = facesContext.getApplication();
String userBundleName = application.getMessageBundle();
ResourceBundle bundle = null;
ClassLoader currentClassLoader = LangUtils.getCurrentClassLoader(application.getClass());
代码示例来源:origin: org.apache.myfaces.extensions.cdi.modules/myfaces-extcdi-jsf12-module-impl
/**
* {@inheritDoc}
*/
public String getMessageBundle()
{
return wrapped.getMessageBundle();
}
代码示例来源:origin: org.apache.openwebbeans/openwebbeans-jsf12
@Override
public String getMessageBundle()
{
return this.wrappedApplication.getMessageBundle();
}
代码示例来源:origin: com.sun.faces/jsf-api
/**
* The default behavior of this method
* is to call {@link Application#getMessageBundle} on the
* wrapped {@link Application} object.
*/
@Override
public String getMessageBundle() {
return getWrapped().getMessageBundle();
}
代码示例来源:origin: javax/javaee-web-api
/**
* The default behavior of this method
* is to call {@link Application#getMessageBundle} on the
* wrapped {@link Application} object.
*/
@Override
public String getMessageBundle() {
return getWrapped().getMessageBundle();
}
代码示例来源:origin: org.apache.myfaces.core/myfaces-api
@Override
public String getMessageBundle()
{
return getWrapped().getMessageBundle();
}
代码示例来源:origin: omnifaces/omnifaces
/**
* @see Faces#getMessageBundle()
*/
public static ResourceBundle getMessageBundle(FacesContext context) {
String messageBundle = context.getApplication().getMessageBundle();
if (messageBundle == null) {
return null;
}
return ResourceBundle.getBundle(messageBundle, getLocale(context));
}
代码示例来源:origin: org.jboss.weld.servlet/weld-servlet-int
@Override
public String getMessageBundle()
{
return delegate().getMessageBundle();
}
代码示例来源:origin: org.apache.myfaces/com.springsource.org.apache.myfaces.javax.faces
private static ResourceBundle getApplicationBundle(FacesContext facesContext, Locale locale)
{
String bundleName = facesContext.getApplication().getMessageBundle();
return bundleName != null ? getBundle(facesContext, locale, bundleName) : null;
}
代码示例来源:origin: org.apache.myfaces.core/myfaces-api
private static ResourceBundle getApplicationBundle(FacesContext facesContext, Locale locale)
{
String bundleName = facesContext.getApplication().getMessageBundle();
return bundleName != null ? getBundle(facesContext, locale, bundleName) : null;
}
代码示例来源:origin: org.apache.myfaces.core/myfaces-api
private static ResourceBundle getApplicationBundle(FacesContext facesContext, Locale locale)
{
String bundleName = facesContext.getApplication().getMessageBundle();
return bundleName != null ? getBundle(facesContext, locale, bundleName) : null;
}
代码示例来源:origin: org.apache.myfaces.core/myfaces-api
private static ResourceBundle getApplicationBundle(FacesContext facesContext, Locale locale)
{
String bundleName = facesContext.getApplication().getMessageBundle();
return bundleName != null ? getBundle(facesContext, locale, bundleName) : null;
}
代码示例来源:origin: org.apache.myfaces.core/myfaces-api
private static ResourceBundle getApplicationBundle(FacesContext facesContext, Locale locale)
{
String bundleName = facesContext.getApplication().getMessageBundle();
return bundleName != null ? getBundle(facesContext, locale, bundleName) : null;
}
代码示例来源:origin: org.glassfish/jakarta.faces
/**
*
* The default behavior of this method is to call {@link Application#getMessageBundle} on the
* wrapped {@link Application} object.
*
*/
@Override
public String getMessageBundle() {
return getWrapped().getMessageBundle();
}
代码示例来源:origin: org.apache.myfaces.extensions.scripting/extscript-core
public String getMessageBundle()
{
weaveDelegate();
return _delegate.getMessageBundle();
}
代码示例来源:origin: org.glassfish/javax.faces
/**
*
* The default behavior of this method is to call {@link Application#getMessageBundle} on the
* wrapped {@link Application} object.
*
*/
@Override
public String getMessageBundle() {
return getWrapped().getMessageBundle();
}
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-webapp-base
protected static String translate(FacesContext context, String label) {
String bundleName = context.getApplication().getMessageBundle();
Locale locale = context.getViewRoot().getLocale();
label = I18NUtils.getMessageString(bundleName, label, null, locale);
return label;
}
代码示例来源:origin: org.seasar.teeda/teeda-core
private static MessageResourceBundle getBundle(FacesContext context,
Locale locale) {
MessageResourceBundle bundle = null;
String appBundleName = context.getApplication().getMessageBundle();
if (appBundleName != null) {
bundle = getBundle(context, locale, appBundleName);
}
if (bundle == null) {
bundle = getDefaultBundle(context, locale);
}
return bundle;
}
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-webapp-core
@Override
public void validateOptionSelection(FacesContext context, UIComponent component, Object value) {
if (value != null) {
// ok
return;
}
String bundleName = context.getApplication().getMessageBundle();
Locale locale = context.getViewRoot().getLocale();
String msg = I18NUtils.getMessageString(bundleName, "error.versioning.none_selected", null, locale);
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, msg, msg);
throw new ValidatorException(message);
}