/** * Add a <code>FormSet</code> to this <code>ValidatorResources</code> * object. It will be associated with the <code>Locale</code> of the * <code>FormSet</code>. * @param fs The form set to add. * @since Validator 1.1 */ public void addFormSet(FormSet fs) { String key = this.buildKey(fs); if (key.length() == 0) {// there can only be one default formset if (getLog().isWarnEnabled() && defaultFormSet != null) { // warn the user he might not get the expected results getLog().warn("Overriding default FormSet definition."); } defaultFormSet = fs; } else { FormSet formset = getFormSets().get(key); if (formset == null) {// it hasn't been included yet if (getLog().isDebugEnabled()) { getLog().debug("Adding FormSet '" + fs.toString() + "'."); } } else if (getLog().isWarnEnabled()) {// warn the user he might not // get the expected results getLog() .warn("Overriding FormSet definition. Duplicate for locale: " + key); } getFormSets().put(key, fs); } }
/** * Add a <code>FormSet</code> to this <code>ValidatorResources</code> * object. It will be associated with the <code>Locale</code> of the * <code>FormSet</code>. * @param fs The form set to add. * @since Validator 1.1 */ public void addFormSet(FormSet fs) { String key = this.buildKey(fs); if (key.length() == 0) {// there can only be one default formset if (getLog().isWarnEnabled() && defaultFormSet != null) { // warn the user he might not get the expected results getLog().warn("Overriding default FormSet definition."); } defaultFormSet = fs; } else { FormSet formset = getFormSets().get(key); if (formset == null) {// it hasn't been included yet if (getLog().isDebugEnabled()) { getLog().debug("Adding FormSet '" + fs.toString() + "'."); } } else if (getLog().isWarnEnabled()) {// warn the user he might not // get the expected results getLog() .warn("Overriding FormSet definition. Duplicate for locale: " + key); } getFormSets().put(key, fs); } }
/** * Add a <code>FormSet</code> to this <code>ValidatorResources</code> * object. It will be associated with the <code>Locale</code> of the * <code>FormSet</code>. * @param fs The form set to add. * @since Validator 1.1 */ public void addFormSet(FormSet fs) { String key = this.buildKey(fs); if (key.length() == 0) {// there can only be one default formset if (getLog().isWarnEnabled() && defaultFormSet != null) { // warn the user he might not get the expected results getLog().warn("Overriding default FormSet definition."); } defaultFormSet = fs; } else { FormSet formset = (FormSet) hFormSets.get(key); if (formset == null) {// it hasn't been included yet if (getLog().isDebugEnabled()) { getLog().debug("Adding FormSet '" + fs.toString() + "'."); } } else if (getLog().isWarnEnabled()) {// warn the user he might not // get the expected results getLog() .warn("Overriding FormSet definition. Duplicate for locale: " + key); } hFormSets.put(key, fs); } }