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


Java FacesMessage.SEVERITY_FATAL属性代码示例

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


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

示例1: sGetMaxSeverity

public static FacesMessage.Severity sGetMaxSeverity(UIXRenderingContext context)
{
  // This doesn't seem to work if there is a global message
  // return context.getFacesContext().getMaximumSeverity();
  FacesMessage.Severity max = FacesMessage.SEVERITY_INFO;
  Iterator<MessageWrapper> itr = sGetIterator(context, true);
  while (itr.hasNext())
  {
    FacesMessage nxt = itr.next();
    FacesMessage.Severity sev = nxt.getSeverity();
    if (sev.compareTo(max) > 0)
    {
      max = sev;
      if (FacesMessage.SEVERITY_FATAL.compareTo(max) == 0)
        return FacesMessage.SEVERITY_FATAL;
    }
  }
  return max;
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:19,代码来源:MessageBoxUtils.java

示例2: MessageTest

public MessageTest(String severity, String summary, String detail,
                   String clientId)
{
  FacesMessage.Severity sev = FacesMessage.SEVERITY_INFO;

  if (severity != null)
  {
    if ("ERROR".equals(severity))
      sev = FacesMessage.SEVERITY_ERROR;
    else if ("WARN".equals(severity) || "WARNING".equals(severity))
      sev = FacesMessage.SEVERITY_WARN;
    else if ("FATAL".equals(severity))
      sev = FacesMessage.SEVERITY_FATAL;
  }
  
  _messages.put(clientId, new FacesMessage(sev, summary, detail));
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:17,代码来源:TestScript.java

示例3: createGlobalMessage

public String createGlobalMessage()
{
  FacesContext context = FacesContext.getCurrentInstance();

  FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_FATAL,
      "Fatal Msg.", "Programatically generated at " + new Date());
  
  context.addMessage(null, msg);

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

示例4: createGlobalMessage

public String createGlobalMessage() {
    FacesContext context = FacesContext.getCurrentInstance();

    FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_FATAL,
            "Fatal Msg.", "Programatically generated at " + new Date());

    context.addMessage(null, msg);

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


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