@Override public Validator createValidator(String validatorId) throws FacesException { return delegate().createValidator(validatorId); }
@Override @SuppressWarnings("unchecked") public <T> T create(Application application, String id) { return (T) application.createValidator(id); }
@Override public Validator createValidator(String arg0) throws FacesException { return this.wrappedApplication.createValidator(arg0); }
private Class<? extends Validator> getBuiltInBeanValidatorClass(FacesContext context) { try { Validator beanValidator = context.getApplication().createValidator(BeanValidator.VALIDATOR_ID); return beanValidator.getClass(); } catch(FacesException e){ return null; } }
@Override protected Validator createValidator() { Application app = FacesContext.getCurrentInstance().getApplication(); CreditCardValidator validator = (CreditCardValidator) app.createValidator("com.sun.faces.ext.validator.CreditCardValidator"); return validator; } }
/** * <p class="changed_added_2_0">The default behavior of this method * is to call {@link Application#createValidator(String)} on the * wrapped {@link Application} object.</p> */ @Override public Validator createValidator(String validatorId) throws FacesException { return getWrapped().createValidator(validatorId); }
/** * <p class="changed_added_2_0">The default behavior of this method * is to call {@link Application#createValidator(String)} on the * wrapped {@link Application} object.</p> */ @Override public Validator createValidator(String validatorId) throws FacesException { return getWrapped().createValidator(validatorId); }
@Override public Validator createValidator(String validatorId) throws FacesException { return managedOrDefaultValidator(this.wrapped.createValidator(validatorId)); }
protected Validator createValidator() throws JspException { String validatorId = "org.apache.myfaces.commons.validator.CompareTo"; Application appl = FacesContext.getCurrentInstance().getApplication(); Validator validator = (Validator)appl.createValidator(validatorId); _setProperties(validator); return validator; }
protected Validator createValidator() throws JspException { String validatorId = "org.apache.myfaces.commons.validator.csv"; Application appl = FacesContext.getCurrentInstance().getApplication(); Validator validator = (Validator)appl.createValidator(validatorId); _setProperties(validator); return validator; }
@Override public Validator createValidator(String validatorId) throws FacesException { return delegate().createValidator(validatorId); }
protected Validator createValidator() throws JspException { String validatorId = "org.apache.myfaces.commons.validator.CompareTo"; Application appl = FacesContext.getCurrentInstance().getApplication(); Validator validator = (Validator)appl.createValidator(validatorId); _setProperties(validator); return validator; }
/** * <p class="changed_added_2_0">The default behavior of this method * is to call {@link Application#createValidator(String)} on the * wrapped {@link Application} object.</p> */ @Override public Validator createValidator(String validatorId) throws FacesException { return getWrapped().createValidator(validatorId); }
@Override public Validator createValidator(String validatorId) throws FacesException { return getWrapped().createValidator(validatorId); }
protected Validator createValidator() throws JspException { String validatorId = "org.apache.myfaces.commons.validator.CreditCard"; Application appl = FacesContext.getCurrentInstance().getApplication(); Validator validator = (Validator)appl.createValidator(validatorId); _setProperties(validator); return validator; }
@Override protected Validator createValidator() { FacesContext ctx = FacesContext.getCurrentInstance(); Application app = ctx.getApplication(); RegexValidator validator = (RegexValidator) app.createValidator("com.sun.faces.ext.validator.RegexValidator"); validator.setPattern((String) regex.getValue(ctx.getELContext())); return validator; } }
@Override public Validator<?> getByValidatorId(String id) { FacesContext facesContext = FacesContext.getCurrentInstance(); Assert.notNull(facesContext, "FacesContext.getCurrentInstance() returned null. " + "You should use @Deferred so the binding gets executed within the JSF lifecycle."); javax.faces.validator.Validator validator = facesContext.getApplication().createValidator(id); if (validator!= null) { return FacesValidatorAdapter.from(validator); } return null; }
public void applyMetadata(FaceletContext ctx, Object instance) { ((EditableValueHolder) instance).addValidator(ctx.getFacesContext().getApplication() .createValidator(this.validatorId)); } }
@Override public void applyMetadata(FaceletContext ctx, Object instance) { ((EditableValueHolder) instance).addValidator(ctx.getFacesContext() .getApplication().createValidator(this.validatorId)); } }
public Validator createChildrenValidator() { FacesBeanValidator validator = (FacesBeanValidator) getFacesContext().getApplication().createValidator(getType()); validator.setSummary(getSummary()); ValueExpression expression = getValueExpression("groups"); if (null != expression) { validator.setGroups(expression); } else { validator.setGroups(getGroups()); } return validator; } }