Examples of ValidatorType


Examples of org.eclipse.jst.jsf.facesconfig.emf.ValidatorType

   * @param name Base name of validator from which validator-id and
   * validator-class are formed.
   * @return {@link ValidatorType} instance.
   */
  protected ValidatorType createValidator(String name) {
    ValidatorType validatorType = FacesConfigFactory.eINSTANCE.createValidatorType();
    //set validator-id
    ValidatorIdType validatorIdType = FacesConfigFactory.eINSTANCE.createValidatorIdType();
    StringBuffer sb = new StringBuffer();
    sb.append("javax.faces."); //$NON-NLS-1$
    sb.append(name);
    validatorIdType.setTextContent(sb.toString());
    validatorType.setValidatorId(validatorIdType);
    //set validator-class
    ValidatorClassType validatorClassType = FacesConfigFactory.eINSTANCE.createValidatorClassType();
    sb = new StringBuffer();
    sb.append("javax.faces.validator."); //$NON-NLS-1$
    sb.append(name);
    sb.append("Validator"); //$NON-NLS-1$
    validatorClassType.setTextContent(sb.toString());
    validatorType.setValidatorClass(validatorClassType);
    return validatorType;
  }
View Full Code Here

Examples of org.eclipse.jst.jsf.facesconfig.emf.ValidatorType

   * @param name Base name of validator from which validator-id and
   * validator-class are formed.
   * @return {@link ValidatorType} instance.
   */
  protected ValidatorType createValidator(String name) {
    ValidatorType validatorType = FacesConfigFactory.eINSTANCE.createValidatorType();
    //set validator-id
    ValidatorIdType validatorIdType = FacesConfigFactory.eINSTANCE.createValidatorIdType();
    StringBuffer sb = new StringBuffer();
    sb.append("javax.faces."); //$NON-NLS-1$
    sb.append(name);
    validatorIdType.setTextContent(sb.toString());
    validatorType.setValidatorId(validatorIdType);
    //set validator-class
    ValidatorClassType validatorClassType = FacesConfigFactory.eINSTANCE.createValidatorClassType();
    sb = new StringBuffer();
    sb.append("javax.faces.validator."); //$NON-NLS-1$
    sb.append(name);
    sb.append("Validator"); //$NON-NLS-1$
    validatorClassType.setTextContent(sb.toString());
    validatorType.setValidatorClass(validatorClassType);
    return validatorType;
  }
View Full Code Here

Examples of org.eclipse.jst.jsf.facesconfig.emf.ValidatorType

   */
  protected List getPossibleValueProposals(List elements) {
    List ret = new ArrayList();
    Collections.sort(elements, new ValidatorSorter());
    for (Iterator it = elements.iterator();it.hasNext();){
      ValidatorType obj = (ValidatorType)it.next();
      if (obj.getValidatorId() != null && obj.getValidatorId().getTextContent() != null){
        PossibleValue pv = createProposal(obj.getValidatorId().getTextContent(), obj.getDisplayName(), obj.getDescription());
        if (pv != null){
          pv.setIcon(getImage());
          ret.add(pv);
        }
      }
View Full Code Here

Examples of org.eclipse.jst.jsf.facesconfig.emf.ValidatorType

   */
  protected List getElementIDs(JSFAppConfigManager mgr) {
    List elements = getElements(mgr);
    List ret = new ArrayList(elements.size());   
    for (Iterator it = elements.iterator();it.hasNext();){
      ValidatorType aType = (ValidatorType)it.next();
      if (aType.getValidatorId() != null && aType.getValidatorId().getTextContent() != null){
        String id = aType.getValidatorId().getTextContent();
        if (id != null)
          ret.add(id.trim());
      }
    }
    return ret;
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.