Package javax.faces.validator

Examples of javax.faces.validator.RegexValidator


     *
     * @see org.richfaces.javascript.client.validator.ValidatorTestBase#createValidator()
     */
    @Override
    protected Validator createValidator() {
        RegexValidator validator = new RegexValidator();
        Map<String, Object> options = getOptions();
        if (options.containsKey(PATTERN)) {
            validator.setPattern((String) options.get(PATTERN));
        }
        return validator;
    }
View Full Code Here


    }

    @Override
    protected Validator createValidator() throws JspException {
        super.setValidatorId(VALIDATOR_ID_EXPR);
        RegexValidator validator = (RegexValidator) super.createValidator();
        assert (validator != null);
        if (regex != null) {
            FacesContext ctx = FacesContext.getCurrentInstance();
            validator.setPattern((String) regex.getValue(ctx.getELContext()));
        }
        return validator;
       
    }
View Full Code Here

            }
        }
        if (null != _pattern)
        {
            Application appl = fc.getApplication();
            RegexValidator validator = (RegexValidator) appl.createValidator(RegexValidator.VALIDATOR_ID);
            String pattern = (String)_pattern.getValue(elc);
            validator.setPattern(pattern);

            if (_binding != null)
            {
                _binding.setValue(elc, validator);
            }
View Full Code Here

    }

    @Override
    protected Validator createValidator() throws JspException {
        super.setValidatorId(VALIDATOR_ID_EXPR);
        RegexValidator validator = (RegexValidator) super.createValidator();
        assert (validator != null);
        if (regex != null) {
            FacesContext ctx = FacesContext.getCurrentInstance();
            validator.setPattern((String) regex.getValue(ctx.getELContext()));
        }
        return validator;
       
    }
View Full Code Here

    }

    @Override
    protected Validator createValidator() throws JspException {
        super.setValidatorId(VALIDATOR_ID_EXPR);
        RegexValidator validator = (RegexValidator) super.createValidator();
        assert (validator != null);
        if (regex != null) {
            FacesContext ctx = FacesContext.getCurrentInstance();
            validator.setPattern((String) regex.getValue(ctx.getELContext()));
        }
        return validator;
       
    }
View Full Code Here

            }
            if (validator.getMinimum() != 0) {
                descriptor.addParameter(MINIMUM, validator.getMinimum());
            }
        } else if (component instanceof RegexValidator) {
            RegexValidator validator = (RegexValidator) component;
            descriptor.addParameter(PATTERN, validator.getPattern());
        } else if (component instanceof RequiredValidator) {
            // do nothing.
        } else {
            super.fillParameters(descriptor, component);
        }
View Full Code Here

    }

    @Override
    protected Validator createValidator() throws JspException {
        super.setValidatorId(VALIDATOR_ID_EXPR);
        RegexValidator validator = (RegexValidator) super.createValidator();
        assert (validator != null);
        if (regex != null) {
            FacesContext ctx = FacesContext.getCurrentInstance();
            validator.setPattern((String) regex.getValue(ctx.getELContext()));
        }
        return validator;
       
    }
View Full Code Here

TOP

Related Classes of javax.faces.validator.RegexValidator

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.