Package javax.faces.application.FacesMessage

Examples of javax.faces.application.FacesMessage.Severity.compareTo()


      return true;
    }
    Severity severity = message.getSeverity();
    for (Object key : FacesMessage.VALUES_MAP.keySet()) {
      Severity sev = (Severity) FacesMessage.VALUES_MAP.get(key);
      if (0 == sev.compareTo(severity)) {
        return severenities.contains(key);
      }
    }
    return false;
  }
View Full Code Here


//      return false;
//    }
    Severity severity = message.getSeverity();
    for (Object key : FacesMessage.VALUES_MAP.keySet()) {
      Severity sev = (Severity) FacesMessage.VALUES_MAP.get(key);
      if (0 == sev.compareTo(severity)) {
        return severenities.contains(((String)key).toUpperCase(Locale.ENGLISH));
      }
    }
    return false;
  }
View Full Code Here

     */
    public void testGetMaximumSeverity() {
   assertNull(portalFacesContext.getMaximumSeverity());
   portalFacesContext.addMessage(ID0, new FacesMessage());
   Severity maximumSeverity = portalFacesContext.getMaximumSeverity();
   assertEquals(0,maximumSeverity.compareTo(FacesMessage.SEVERITY_INFO));
   portalFacesContext.addMessage("_id1", new FacesMessage(FacesMessage.SEVERITY_ERROR,"error","error detail"));
   maximumSeverity = portalFacesContext.getMaximumSeverity();
   assertEquals(0,maximumSeverity.compareTo(FacesMessage.SEVERITY_ERROR));
    }

View Full Code Here

   portalFacesContext.addMessage(ID0, new FacesMessage());
   Severity maximumSeverity = portalFacesContext.getMaximumSeverity();
   assertEquals(0,maximumSeverity.compareTo(FacesMessage.SEVERITY_INFO));
   portalFacesContext.addMessage("_id1", new FacesMessage(FacesMessage.SEVERITY_ERROR,"error","error detail"));
   maximumSeverity = portalFacesContext.getMaximumSeverity();
   assertEquals(0,maximumSeverity.compareTo(FacesMessage.SEVERITY_ERROR));
    }

    /**
     * Test method for {@link org.jboss.portletbridge.context.FacesContextImpl#getMessages()}.
     */
 
View Full Code Here

     */
    public void testGetMaximumSeverity() {
   assertNull(portalFacesContext.getMaximumSeverity());
   portalFacesContext.addMessage(ID0, new FacesMessage());
   Severity maximumSeverity = portalFacesContext.getMaximumSeverity();
   assertEquals(0,maximumSeverity.compareTo(FacesMessage.SEVERITY_INFO));
   portalFacesContext.addMessage("_id1", new FacesMessage(FacesMessage.SEVERITY_ERROR,"error","error detail"));
   maximumSeverity = portalFacesContext.getMaximumSeverity();
   assertEquals(0,maximumSeverity.compareTo(FacesMessage.SEVERITY_ERROR));
    }

View Full Code Here

   portalFacesContext.addMessage(ID0, new FacesMessage());
   Severity maximumSeverity = portalFacesContext.getMaximumSeverity();
   assertEquals(0,maximumSeverity.compareTo(FacesMessage.SEVERITY_INFO));
   portalFacesContext.addMessage("_id1", new FacesMessage(FacesMessage.SEVERITY_ERROR,"error","error detail"));
   maximumSeverity = portalFacesContext.getMaximumSeverity();
   assertEquals(0,maximumSeverity.compareTo(FacesMessage.SEVERITY_ERROR));
    }

    /**
     * Test method for {@link org.jboss.portletbridge.context.FacesContextImpl#getMessages()}.
     */
 
View Full Code Here

            && !(componentMessageLists.isEmpty())) {
            for (Iterator<FacesMessage> i =
                  new ComponentMessagesIterator(componentMessageLists);
                 i.hasNext();) {
                Severity severity = i.next().getSeverity();
                if (result == null || severity.compareTo(result) > 0) {
                    result = severity;
                }
                if (result == FacesMessage.SEVERITY_FATAL) {
                    break;
                }
View Full Code Here

            && !(componentMessageLists.isEmpty())) {
            for (Iterator<FacesMessage> i =
                  new ComponentMessagesIterator(componentMessageLists);
                 i.hasNext();) {
                Severity severity = i.next().getSeverity();
                if (result == null || severity.compareTo(result) > 0) {
                    result = severity;
                }
                if (result == FacesMessage.SEVERITY_FATAL) {
                    break;
                }
View Full Code Here

         if (componentMessageLists != null && !(componentMessageLists.isEmpty())) {
             for (Iterator<FacesMessage> i =
                   new ComponentMessagesIterator(componentMessageLists);
                  i.hasNext();) {
                 Severity severity = i.next().getSeverity();
                 if (result == null || severity.compareTo(result) > 0) {
                     result = severity;                
                 }
                 if (result == FacesMessage.SEVERITY_FATAL) {
                     break;
                 }
View Full Code Here

            && !(componentMessageLists.isEmpty())) {
            for (Iterator<FacesMessage> i =
                  new ComponentMessagesIterator(componentMessageLists);
                 i.hasNext();) {
                Severity severity = i.next().getSeverity();
                if (result == null || severity.compareTo(result) > 0) {
                    result = severity;
                }
                if (result == FacesMessage.SEVERITY_FATAL) {
                    break;
                }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.