Author: pbenedict Date: Sat Jun 30 20:39:17 2007 New Revision: 552241 URL: http://svn.apache.org/viewvc?view=rev&rev=552241 Log: STR-2611: processFailure to accept form name
Modified: struts/struts1/trunk/core/src/main/java/org/apache/struts/validator/FieldChecks.java struts/struts1/trunk/core/src/main/java/org/apache/struts/validator/LocalStrings.properties Modified: struts/struts1/trunk/core/src/main/java/org/apache/struts/validator/FieldChecks.java URL: http://svn.apache.org/viewvc/struts/struts1/trunk/core/src/main/java/org/apache/struts/validator/FieldChecks.java?view=diff&rev=552241&r1=552240&r2=552241 ============================================================================== --- struts/struts1/trunk/core/src/main/java/org/apache/struts/validator/FieldChecks.java (original) +++ struts/struts1/trunk/core/src/main/java/org/apache/struts/validator/FieldChecks.java Sat Jun 30 20:39:17 2007 @@ -240,7 +240,7 @@ return true; } } catch (Exception e) { - processFailure(errors, field, "mask", e); + processFailure(errors, field, validator.getFormName(), "mask", e); return false; } @@ -835,7 +835,7 @@ return false; } } catch (Exception e) { - processFailure(errors, field, "longRange", e); + processFailure(errors, field, validator.getFormName(), "longRange", e); return false; } @@ -889,7 +889,7 @@ return false; } } catch (Exception e) { - processFailure(errors, field, "intRange", e); + processFailure(errors, field, validator.getFormName(), "intRange", e); return false; } @@ -943,7 +943,7 @@ return false; } } catch (Exception e) { - processFailure(errors, field, "doubleRange", e); + processFailure(errors, field, validator.getFormName(), "doubleRange", e); return false; } @@ -997,7 +997,7 @@ return false; } } catch (Exception e) { - processFailure(errors, field, "floatRange", e); + processFailure(errors, field, validator.getFormName(), "floatRange", e); return false; } @@ -1123,7 +1123,7 @@ return false; } } catch (Exception e) { - processFailure(errors, field, "maxlength", e); + processFailure(errors, field, validator.getFormName(), "maxlength", e); return false; } @@ -1179,7 +1179,7 @@ return false; } } catch (Exception e) { - processFailure(errors, field, "minlength", e); + processFailure(errors, field, validator.getFormName(), "minlength", e); return false; } @@ -1309,11 +1309,11 @@ * Process a validation failure. */ private static void processFailure(ActionMessages errors, Field field, - String validator, Throwable t) { + String formName, String validatorName, Throwable t) { // Log the error String logErrorMsg = - sysmsgs.getMessage("validation.failed", validator, - field.getProperty(), t.toString()); + sysmsgs.getMessage("validation.failed", validatorName, + field.getProperty(), formName, t.toString()); log.error(logErrorMsg); Modified: struts/struts1/trunk/core/src/main/java/org/apache/struts/validator/LocalStrings.properties URL: http://svn.apache.org/viewvc/struts/struts1/trunk/core/src/main/java/org/apache/struts/validator/LocalStrings.properties?view=diff&rev=552241&r1=552240&r2=552241 ============================================================================== --- struts/struts1/trunk/core/src/main/java/org/apache/struts/validator/LocalStrings.properties (original) +++ struts/struts1/trunk/core/src/main/java/org/apache/struts/validator/LocalStrings.properties Sat Jun 30 20:39:17 2007 @@ -14,7 +14,7 @@ # limitations under the License. system.error=SYSTEM ERROR: Check logs for details. -validation.failed={0} validation failed for property {1}: {2} +validation.failed={0} validation failed for property {1} of form key {2}: {3} variable.missing=Variable {0} is missing. variable.resource.notfound=Key {1} not found for Variable {0} in bundle {2}. invalid.range=Minimum value {0} is greater than maximum value {1}