当前位置: 首页>>代码示例>>Java>>正文


Java FacesMessage.Severity方法代码示例

本文整理汇总了Java中javax.faces.application.FacesMessage.Severity方法的典型用法代码示例。如果您正苦于以下问题:Java FacesMessage.Severity方法的具体用法?Java FacesMessage.Severity怎么用?Java FacesMessage.Severity使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.faces.application.FacesMessage的用法示例。


在下文中一共展示了FacesMessage.Severity方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getMessageType

import javax.faces.application.FacesMessage; //导入方法依赖的package包/类
@Override
protected String getMessageType(
  UIComponent component,
  FacesBean   bean)
{
  String messageType = null;

  FacesMessage.Severity maxSeverity =
    FacesContext.getCurrentInstance().getMaximumSeverity();

  // Map FacesMessage severity to levels expected by panelHeaderRenderer
  if (maxSeverity == null)
    messageType = XhtmlConstants.MESSAGE_TYPE_ERROR;
  else if (FacesMessage.SEVERITY_FATAL.equals(maxSeverity))
    messageType = XhtmlConstants.MESSAGE_TYPE_ERROR;
  else if (FacesMessage.SEVERITY_ERROR.equals(maxSeverity))
    messageType = XhtmlConstants.MESSAGE_TYPE_ERROR;
  else if (FacesMessage.SEVERITY_WARN.equals(maxSeverity))
    messageType = XhtmlConstants.MESSAGE_TYPE_WARNING;
  else if (FacesMessage.SEVERITY_INFO.equals(maxSeverity))
    messageType = XhtmlConstants.MESSAGE_TYPE_INFO;

  return messageType;
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:25,代码来源:MessageBoxRenderer.java

示例2: _createFacesMessage

import javax.faces.application.FacesMessage; //导入方法依赖的package包/类
private static FacesMessage _createFacesMessage(
  FacesMessage.Severity severity,
  ErrorMessages messageStrings,
  Object label
  )
{
  if (messageStrings instanceof BindingErrorMessages)
  {
     return new BindingFacesMessage(severity, messageStrings, label);
  }

  String summary = messageStrings.getMessage();
  String detail  = messageStrings.getDetailMessage();

  return new LabeledFacesMessage(severity, summary, detail, label);
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:17,代码来源:MessageFactory.java

示例3: LabeledFacesMessage

import javax.faces.application.FacesMessage; //导入方法依赖的package包/类
/**
 * Creates a LabeledFacesMessage without a pre-set label.
 * @param severity the severity of the message
 * @param summary the message summary
 * @param detail the message detail
 */
public LabeledFacesMessage(
  FacesMessage.Severity severity,
  String summary,
  String detail)
{
  super(severity, summary, detail);
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:14,代码来源:LabeledFacesMessage.java

示例4: prepareOrganizationBean

import javax.faces.application.FacesMessage; //导入方法依赖的package包/类
private OrganizationBean prepareOrganizationBean() {
    return organizationBean = new OrganizationBean() {
        /**
         * 
         */
        private static final long serialVersionUID = 8837356005032690342L;

        @Override
        public void addMessage(final String clientId,
                final FacesMessage.Severity severity, final String key) {
            messageKey = key;
        }
    };
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:15,代码来源:OrganizationBeanTest.java

示例5: BusinessException

import javax.faces.application.FacesMessage; //导入方法依赖的package包/类
/**
 * @param summary exception summary
 * @param detail exception detail
 * @param severity Faces message severity
 */
public BusinessException(String summary, String detail, FacesMessage.Severity severity) {
    super(summary);
    this.detail = detail;
    this.summary = summary;
    this.severity = severity;
}
 
开发者ID:adminfaces,项目名称:admin-template,代码行数:12,代码来源:BusinessException.java

示例6: addFieldInputMessages

import javax.faces.application.FacesMessage; //导入方法依赖的package包/类
public static void addFieldInputMessages(String index, FacesMessage.Severity severity, String message) {
	if (index != null && index.length() > 0) {
		Iterator<String> it = INPUT_FIELD_COMPONENT_CLIENT_ID_PREFIXES.iterator();
		while (it.hasNext()) {
			Messages.addMessageId(it.next() + index, severity, message);
		}
	} else {
		Messages.addMessage(severity, message);
	}
}
 
开发者ID:phoenixctms,项目名称:ctsms,代码行数:11,代码来源:Messages.java

示例7: addLocalizedMessageId

import javax.faces.application.FacesMessage; //导入方法依赖的package包/类
public static void addLocalizedMessageId(String id, FacesMessage.Severity severity, String l10nKey, Object... args) {
	FacesContext context = FacesContext.getCurrentInstance();
	addMessageId(context, id, severity, CommonUtil.getMessage(l10nKey, args, getMessageResourceBundle(context), DEFAULT_FACES_MESSAGE));
}
 
开发者ID:phoenixctms,项目名称:ctsms,代码行数:5,代码来源:Messages.java

示例8: addMessage

import javax.faces.application.FacesMessage; //导入方法依赖的package包/类
public void addMessage(FacesMessage.Severity severity, String msgKey,
        Object... params) {
    JSFUtils.addMessage(null, severity, msgKey, params);
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:5,代码来源:UserGroupListCtrl.java

示例9: addMessage

import javax.faces.application.FacesMessage; //导入方法依赖的package包/类
public void addMessage(FacesMessage.Severity severityError, String msgKey) {
    JSFUtils.addMessage(null, severityError, msgKey, null);
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:4,代码来源:UpgradeWizardConversation.java

示例10: addLocalizedMessageClientId

import javax.faces.application.FacesMessage; //导入方法依赖的package包/类
public static void addLocalizedMessageClientId(String clientId, FacesMessage.Severity severity, String l10nKey, Object... args) {
	FacesContext context = FacesContext.getCurrentInstance();
	addMessageClientId(context, clientId, severity, CommonUtil.getMessage(l10nKey, args, getMessageResourceBundle(context), DEFAULT_FACES_MESSAGE));
}
 
开发者ID:phoenixctms,项目名称:ctsms,代码行数:5,代码来源:Messages.java

示例11: addMessage

import javax.faces.application.FacesMessage; //导入方法依赖的package包/类
@Override
public void addMessage(final String clientId,
        final FacesMessage.Severity severity, final String key) {
    super.addMessage(clientId, severity, key, (Object[]) null);
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:6,代码来源:LdapConfigurationCtrl.java

示例12: addMessageClientId

import javax.faces.application.FacesMessage; //导入方法依赖的package包/类
private static void addMessageClientId(FacesContext context, String clientId, FacesMessage.Severity severity, String message) {
	if (context != null) {
		FacesMessage facesMessage = new FacesMessage(severity, message, null);
		context.addMessage(clientId, facesMessage);
	}
}
 
开发者ID:phoenixctms,项目名称:ctsms,代码行数:7,代码来源:Messages.java

示例13: setSeverity

import javax.faces.application.FacesMessage; //导入方法依赖的package包/类
@Override
public void setSeverity(FacesMessage.Severity severity)
{
  _wrapped.setSeverity(severity);
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:6,代码来源:FacesMessageWrapper.java

示例14: getMaximumSeverity

import javax.faces.application.FacesMessage; //导入方法依赖的package包/类
@Override
public FacesMessage.Severity getMaximumSeverity()
{
  return null;
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:6,代码来源:PseudoFacesContext.java

示例15: addLocalizedMessage

import javax.faces.application.FacesMessage; //导入方法依赖的package包/类
public static void addLocalizedMessage(FacesMessage.Severity severity, String l10nKey, Object... args) {
	FacesContext context = FacesContext.getCurrentInstance();
	addMessage(context, severity, CommonUtil.getMessage(l10nKey, args, getMessageResourceBundle(context), DEFAULT_FACES_MESSAGE));
}
 
开发者ID:phoenixctms,项目名称:ctsms,代码行数:5,代码来源:Messages.java


注:本文中的javax.faces.application.FacesMessage.Severity方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。