/** * A method to append a validation response to this validation response. The errors list and warnings list are * simply appended, and the isValid is logically AND-ed and isModified is logically OR-ed. */ public void append(ValidationResponse response) { for (ValidationMessage msg : response.getValidationErrors()) { if (getValidationError(msg.getKey()) != null) { msg.setKey(msg.getKey() + "(" + key++ + ")"); } addValidationError(msg); } for (ValidationMessage msg : response.getValidationWarnings()) { if (getValidationWarning(msg.getKey()) != null) { msg.setKey(msg.getKey() + "(" + key++ + ")"); } addValidationWarning(msg); } setValid(isValid() && response.isValid()); setModified(isModified() || response.isModified()); }
/** * A method to append a validation response to this validation response. The errors list and warnings list are * simply appended, and the isValid is logically AND-ed and isModified is logically OR-ed. * * @param response */ public void append( ValidationResponse response ) { for ( ValidationMessage msg : response.getValidationErrors() ) { if ( getValidationError( msg.getKey() ) != null ) { msg.setKey( msg.getKey() + "(" + key++ + ")" ); } addValidationError( msg ); } for ( ValidationMessage msg : response.getValidationWarnings() ) { if ( getValidationWarning( msg.getKey() ) != null ) { msg.setKey( msg.getKey() + "(" + key++ + ")" ); } addValidationWarning( msg ); } setValid( isValid() && response.isValid() ); setModified( isModified() || response.isModified() ); }