Examples of Severity


Examples of javax.faces.application.FacesMessage.Severity

      
    String labelStyle = null;
      
    String passLabel = null;
      
    Severity severity = null;
      
          
    if(facesMsg != null){
      
      severity = facesMsg.getSeverity();
View Full Code Here

Examples of javax.faces.application.FacesMessage.Severity

   
    String outerClass = null;
      
    String outerStyle = null;
      
    Severity severity = null;
      
      
    if(facesMsg != null){
        
      severity = facesMsg.getSeverity();
View Full Code Here

Examples of javax.faces.application.FacesMessage.Severity

   
    if(acceptLevels.contains(ALL_NAME) || message == null){
      return true;
    }
   
    Severity severity = message.getSeverity();
   
    if(severity == FacesMessage.SEVERITY_ERROR
        && acceptLevels.contains(ERROR_NAME)){
      accept = true;
     
View Full Code Here

Examples of javax.faces.application.FacesMessage.Severity

         final String viewId = render.attributeValue("view-id");
         Element messageElement = render.element("message");
         String message = messageElement==null ? null : messageElement.getTextTrim();
         String control = messageElement==null ? null : messageElement.attributeValue("for");
         String severityName = messageElement==null ? null : messageElement.attributeValue("severity");
         Severity severity = severityName==null ?
                  FacesMessage.SEVERITY_INFO :
                  getFacesMessageValuesMap().get( severityName.toUpperCase() );
         rule.addNavigationHandler( new RenderNavigationHandler(stringValueExpressionFor(viewId), message, severity, control) );
      }
     
      Element redirect = element.element("redirect");
      if (redirect!=null)
      {
         List<Element> children = redirect.elements("param");
         final List<Param> params = new ArrayList<Param>();
         for (Element child: children)
         {
            params.add( parseParam(child) );
         }
         final String viewId = redirect.attributeValue("view-id");
         final String url    = redirect.attributeValue("url");

         Element messageElement = redirect.element("message");
         String control = messageElement==null ? null : messageElement.attributeValue("for");
         String message = messageElement==null ? null : messageElement.getTextTrim();
         String severityName = messageElement==null ? null : messageElement.attributeValue("severity");
         Severity severity = severityName==null ?
                  FacesMessage.SEVERITY_INFO :
                  getFacesMessageValuesMap().get( severityName.toUpperCase() );
         rule.addNavigationHandler(new RedirectNavigationHandler(stringValueExpressionFor(viewId),
                                                                 stringValueExpressionFor(url),
                                                                 params, message, severity, control) );
View Full Code Here

Examples of javax.faces.application.FacesMessage.Severity

      {
         String viewId = redirect.attributeValue("view-id");
         Element messageElement = redirect.element("message");
         final String message = messageElement==null ? null : messageElement.getTextTrim();
         String severityName = messageElement==null ? null : messageElement.attributeValue("severity");
         Severity severity = severityName==null ?
                  FacesMessage.SEVERITY_INFO :
                  Pages.getFacesMessageValuesMap().get( severityName.toUpperCase() );
         return new ConfigRedirectHandler(viewId == null ? null : Expressions.instance().createValueExpression(
               viewId, String.class), clazz, endConversation, message, severity);
      }
View Full Code Here

Examples of javax.faces.application.FacesMessage.Severity

        return Lists.newArrayList(filteredMessages);
    }

    private Predicate<MessageForRender> getMessagesLevelFilter(FacesContext context, UIComponent component) {

        final Severity level = getLevel(component);
        final boolean displayAll = isComponentMessages(component);
        final boolean redisplay = Boolean.TRUE.equals(component.getAttributes().get("redisplay"));
        Predicate<MessageForRender> predicate = new Predicate<MessageForRender>() {
            private int count = 0;
View Full Code Here

Examples of javax.faces.application.FacesMessage.Severity

        return predicate;
    }

    protected Severity getLevel(UIComponent component) {
        Object levelName = component.getAttributes().get("level");
        final Severity level = (Severity) (FacesMessage.VALUES_MAP.containsKey(levelName) ? FacesMessage.VALUES_MAP
                .get(levelName) : FacesMessage.SEVERITY_INFO);
        return level;
    }
View Full Code Here

Examples of javax.faces.application.FacesMessage.Severity

            UIComponent target = rendererUtils.findComponentFor(component, forId);
            if (null != target) {
                parametersBuilder.put("forComponentId", target.getClientId(facesContext));
            }
        }
        Severity level = getLevel(component);
        if (FacesMessage.SEVERITY_INFO != level) {
            parametersBuilder.put("level", level.getOrdinal());
        }
        if (!rendererUtils.isBooleanAttribute(component, "showSummary")) {
            parametersBuilder.put("showSummary", false);
        }
        if (rendererUtils.isBooleanAttribute(component, "showDetail")) {
View Full Code Here

Examples of javax.faces.application.FacesMessage.Severity

            UIComponent target = rendererUtils.findComponentFor(component, forId);
            if (null != target) {
                parametersBuilder.put("forComponentId", target.getClientId(facesContext));
            }
        }
        Severity level = getLevel(component);
        if (FacesMessage.SEVERITY_INFO != level) {
            parametersBuilder.put("level", level.getOrdinal());
        }
        if (!rendererUtils.isBooleanAttribute(component, "showSummary")) {
            parametersBuilder.put("showSummary", false);
        }
        if (rendererUtils.isBooleanAttribute(component, "showDetail")) {
View Full Code Here

Examples of javax.faces.application.FacesMessage.Severity

        writer.endElement("div");
               
        return;
      }
            else {
        Severity severity = msg.getSeverity();
        String severityKey = null;
       
        if(severity.equals(FacesMessage.SEVERITY_ERROR)) severityKey = "error";
        else if(severity.equals(FacesMessage.SEVERITY_INFO)) severityKey = "info";
        else if(severity.equals(FacesMessage.SEVERITY_WARN)) severityKey = "warn";
        else if(severity.equals(FacesMessage.SEVERITY_FATAL))  severityKey = "fatal";

                styleClass += " ui-message-" + severityKey + " ui-widget ui-corner-all";
               
                if(iconOnly) {
                    styleClass +=  " ui-message-icon-only ui-helper-clearfix";
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.