Package javax.faces.application

Examples of javax.faces.application.Application.createValidator()


            {
                validator = application.createValidator(_validatorIdString);
            } else if (null != _validatorId)
            {
                String validatorId = (String) _validatorId.getValue(elContext);
                validator = application.createValidator(validatorId);
            }
        } catch (Exception e)
        {
            throw new JspException("Error while creating the Validator", e);
        }
View Full Code Here


        try
        {
            // first check if an ValidatorId was set by a method
            if (null != _validatorIdString)
            {
                validator = application.createValidator(_validatorIdString);
            } else if (null != _validatorId)
            {
                String validatorId = (String) _validatorId.getValue(elContext);
                validator = application.createValidator(validatorId);
            }
View Full Code Here

            {
                validator = application.createValidator(_validatorIdString);
            } else if (null != _validatorId)
            {
                String validatorId = (String) _validatorId.getValue(elContext);
                validator = application.createValidator(validatorId);
            }
        } catch (Exception e)
        {
            throw new JspException("Error while creating the Validator", e);
        }
View Full Code Here

    }

    protected Validator createValidator() throws JspException {
        String validatorId = "org.apache.myfaces.commons.validator.RegExpr";
        Application appl = FacesContext.getCurrentInstance().getApplication();
        Validator validator = (Validator)appl.createValidator(validatorId);
        _setProperties(validator);
        return validator;
    }
   
    protected void _setProperties(Validator val) throws JspException {
View Full Code Here

      String validatorClassName = validatorEntry.getValue();

      // Check that the validator ID is not the BeanValidator one which we handle in a special way.
      // And make sure the default validator is not already set manually as well.
      if (!validatorID.equals(BeanValidator.VALIDATOR_ID) && !containsByClassName(validators, validatorClassName)) {
        validators.add(application.createValidator(validatorID));
      }
    }

    // Set the attributes on all instantiated validators. We don't distinguish here
    // which attribute should go to which validator.
View Full Code Here

        // Check validators
        ValidatorBean[] val = fcb.getValidators();
        for (int i = 0, len = val.length; i < len; i++) {
            try {
                app.createValidator(val[i].getValidatorId());
            } catch (Exception e) {
                context.log(val[i].getValidatorClass(), e);
                success = false;
            }
        }
View Full Code Here

        }

        if (UIComponentTag.isValueReference(_validatorId))
        {
            ValueBinding vb = facesContext.getApplication().createValueBinding(_validatorId);
            return application.createValidator((String)vb.getValue(facesContext));
        }

        return application.createValidator(_validatorId);

    }
View Full Code Here

        {
            ValueBinding vb = facesContext.getApplication().createValueBinding(_validatorId);
            return application.createValidator((String)vb.getValue(facesContext));
        }

        return application.createValidator(_validatorId);

    }

    /**
     *
 
View Full Code Here

        }

        if (UIComponentTag.isValueReference(_validatorId))
        {
            ValueBinding vb = facesContext.getApplication().createValueBinding(_validatorId);
            return application.createValidator((String)vb.getValue(facesContext));
        }

        return application.createValidator(_validatorId);

    }
View Full Code Here

        {
            ValueBinding vb = facesContext.getApplication().createValueBinding(_validatorId);
            return application.createValidator((String)vb.getValue(facesContext));
        }

        return application.createValidator(_validatorId);

    }

    /**
     *
 
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.