/** * Performs validations based on the configured resources. * * @return The <code>Map</code> returned uses the property of the * <code>Field</code> for the key and the value is the number of error the * field had. * @throws ValidatorException If an error occurs during validation */ public ValidatorResults validate() throws ValidatorException { Locale locale = (Locale) this.getParameterValue(LOCALE_PARAM); if (locale == null) { locale = Locale.getDefault(); } this.setParameter(VALIDATOR_PARAM, this); Form form = this.resources.getForm(locale, this.formName); if (form != null) { this.setParameter(FORM_PARAM, form); return form.validate( this.parameters, this.resources.getValidatorActions(), this.page, this.fieldName); } return new ValidatorResults(); }
public Map getValidatorActions() { return resources.getValidatorActions(); }
public Map getValidatorActions() { Map result = null; for (Iterator it = this.resourcesList.iterator(); it.hasNext();) { ValidatorResources resources = (ValidatorResources) it.next(); result = resources.getValidatorActions(); if (result != null) { return result; } } return result; }
protected String getJavascriptStaticMethods(ValidatorResources resources) { StringBuffer sb = new StringBuffer(); sb.append("\n\n"); Iterator actions = resources.getValidatorActions().values().iterator(); while (actions.hasNext()) { ValidatorAction va = (ValidatorAction) actions.next(); if (va != null) { String javascript = va.getJavascript(); if (javascript != null && javascript.length() > 0) { sb.append(javascript + "\n"); } } } return sb.toString(); }
protected String getJavascriptStaticMethods(ValidatorResources resources) { StringBuffer sb = new StringBuffer(); sb.append("\n\n"); Iterator actions = resources.getValidatorActions().values().iterator(); while (actions.hasNext()) { ValidatorAction va = (ValidatorAction) actions.next(); if (va != null) { String javascript = va.getJavascript(); if (javascript != null && javascript.length() > 0) { sb.append(javascript + "\n"); } } } return sb.toString(); }
/** * Performs validations based on the configured resources. * * @return The <code>Map</code> returned uses the property of the * <code>Field</code> for the key and the value is the number of error the * field had. * @throws ValidatorException If an error occurs during validation */ public ValidatorResults validate() throws ValidatorException { Locale locale = (Locale) this.getParameterValue(LOCALE_PARAM); if (locale == null) { locale = Locale.getDefault(); } this.setParameter(VALIDATOR_PARAM, this); Form form = this.resources.getForm(locale, this.formName); if (form != null) { this.setParameter(FORM_PARAM, form); return form.validate( this.parameters, this.resources.getValidatorActions(), this.page, this.fieldName); } return new ValidatorResults(); }
/** * Performs validations based on the configured resources. * * @return The <code>Map</code> returned uses the property of the * <code>Field</code> for the key and the value is the number of error the * field had. * @throws ValidatorException If an error occurs during validation */ @GwtIncompatible("incompatible method") public ValidatorResults validate() throws ValidatorException { Locale locale = (Locale) this.getParameterValue(LOCALE_PARAM); if (locale == null) { locale = Locale.getDefault(); } this.setParameter(VALIDATOR_PARAM, this); Form form = this.resources.getForm(locale, this.formName); if (form != null) { this.setParameter(FORM_PARAM, form); return form.validate( this.parameters, this.resources.getValidatorActions(), this.page, this.fieldName); } return new ValidatorResults(); }