Package org.apache.myfaces.tobago.util

Examples of org.apache.myfaces.tobago.util.ContentType


        throw new ValidatorException(facesMessage);
      }
      // Check only a valid file
      if (file.getSize() > 0 && contentType != null
          && !ContentType.valueOf(contentType).match(ContentType.valueOf(file.getContentType()))) {
        ContentType expectedContentType = ContentType.valueOf(contentType);
        Object [] args = {expectedContentType, component.getId()};
        FacesMessage facesMessage = MessageFactory.createFacesMessage(context,
            CONTENT_TYPE_MESSAGE_ID, FacesMessage.SEVERITY_ERROR, args);
        throw new ValidatorException(facesMessage);
      }
View Full Code Here


        throw new ValidatorException(facesMessage);
      }
      // Check only a valid file
      if (file.getSize() > 0 && contentType != null
          && !ContentType.valueOf(contentType).match(ContentType.valueOf(file.getContentType()))) {
        ContentType expectedContentType = ContentType.valueOf(contentType);
        Object[] args = {expectedContentType, component.getId()};
        FacesMessage facesMessage = MessageFactory.createFacesMessage(context,
            CONTENT_TYPE_MESSAGE_ID, FacesMessage.SEVERITY_ERROR, args);
        throw new ValidatorException(facesMessage);
      }
View Full Code Here

TOP

Related Classes of org.apache.myfaces.tobago.util.ContentType

Copyright © 2018 www.massapicom. 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.