Examples of ValidationMessage


Examples of org.eclipse.jst.jsf.metadataprocessors.features.ValidationMessage

    if (msg == null || msg.equals("")) //$NON-NLS-1$
      msg = defaultMsg;
   
    String code = getValidationCode();
    int severity = getValidationSeverity();
    ValidationMessage val = new ValidationMessage(msg, code, severity);
    getValidationMessages().add(val);
  }
View Full Code Here

Examples of org.eclipse.jst.jsf.metadataprocessors.features.ValidationMessage

   * Non-EL values are invalid for method bound attribute values
   * @see org.eclipse.jst.jsf.metadataprocessors.features.IValidValues#isValidValue(java.lang.String)
   */
  public boolean isValidValue(String value) {   
    //if this is being called, we are being called in an non-EL context which is invalid.
    IValidationMessage msg = new ValidationMessage(Messages.MethodBindingType_invalid_value);
    getValidationMessages().add(msg);
    return false;
  }
View Full Code Here

Examples of org.eclipse.jst.jsf.metadataprocessors.features.ValidationMessage

    return _msgs;
  }

  public boolean isValidValue(String value) {
    if (value.length() != 1)
      getValidationMessages().add(new ValidationMessage(Messages.CharacterType_0));
     
    return getValidationMessages().size() == 0;
  }
View Full Code Here

Examples of org.eclipse.jst.jsf.metadataprocessors.features.ValidationMessage

      //error message is generated later
    }
   
    final String message =
      MessageFormat.format(Messages.Bundle_not_found_rb, value);
    getValidationMessages().add(new ValidationMessage(message, "", IStatus.ERROR)); //$NON-NLS-1$
    return false;
  }
View Full Code Here

Examples of org.eclipse.jst.jsf.metadataprocessors.features.ValidationMessage

    for(int i=0;i<_locales.length;i++){
      Locale local = getLocales()[i];
      if (local.toString().equals(value))
        return true;
    }
    getValidationMessages().add(new ValidationMessage(Messages.LocaleType_1));
    return false;
  }
View Full Code Here

Examples of org.eclipse.jst.jsf.metadataprocessors.features.ValidationMessage

   * @see org.eclipse.jst.jsf.metadataprocessors.features.IValidValues#isValidValue(java.lang.String)
   */
  public boolean isValidValue(String value) {
    IValidationMessage msg = null;
    if (value != null && value.trim().length() == 0)
      msg = new ValidationMessage(Messages.ComponentIDType_invalid_value);
    else {
      //we could validate uniqueness, but will not for the time being.  This would require a DT FacesContext.
      //any other coercion rules apply here?
      return true;
    }     
View Full Code Here

Examples of org.eclipse.jst.jsf.metadataprocessors.features.ValidationMessage

    } catch (MalformedURLException e) {
      //is this a valid path relative to the      
      IProject project = getProject();
      IFile  file= project.getFile(new Path(value));
      if (! file.exists())
        getValidationMessages().add(new ValidationMessage( value+Messages.RelativePathType_0));
     
      return getValidationMessages().size() == 0;
    }
  }
View Full Code Here

Examples of org.eclipse.jst.jsf.metadataprocessors.features.ValidationMessage

    if (msg == null || msg.equals("")) //$NON-NLS-1$
      msg = defaultMsg;
   
    String code = getMDValidationCode();
    int severity = getMDValidationSeverity();
    ValidationMessage val = new ValidationMessage(msg, code, severity);
    getValidationMessages().add(val);
  }
View Full Code Here

Examples of org.eclipse.jst.jsf.metadataprocessors.features.ValidationMessage

  }

    private void validateFileRelativeToWebRoot(String value) {
    IVirtualContainer webRoot = getWebRoot();
    if (! webRoot.exists()){
      getValidationMessages().add(new ValidationMessage( Messages.WebPathType_1));
    }
    else {
      IVirtualFile file = webRoot.getFile(new Path(value));
      if (!file.exists()) {
        //was this a valid file path string, or bogus url?
        getValidationMessages().add(new ValidationMessage(Messages.WebPathType_2));
      }                 
      //we could also validate the expected file-extensions from meta data
    }
   
  }
View Full Code Here

Examples of org.eclipse.jst.jsf.metadataprocessors.features.ValidationMessage

      filePath = filePath.removeFirstSegments(webContentPath.segmentCount());
      filePath = filePath.removeLastSegments(1);
      filePath = filePath.append(value);
      IVirtualFile file = getWebRoot().getFile(filePath);
      if (!file.exists()){
        getValidationMessages().add(new ValidationMessage(Messages.WebPathType_2));
      }
    }
  }
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.