Uploaded image for project: 'Spring Web Flow'
  1. Spring Web Flow
  2. SWF-664

Cannot reject field-specific values through the Errors interface

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.0.RC1
    • 2.0.1
    • None

    Description

      When using the Errors interface for a validator (as opposed to a MessageContext) and its rejectValue method, the actual error is not properly recorded as a field specific error.

      Looking around the code I see the MessageContextErrors does this in rejectValue():
      messageContext.addMessage(new MessageBuilder().error().code(errorCode).defaultText(defaultMessage).build());

      but should probably do this:
      messageContext.addMessage(new MessageBuilder().error().source(field).code(errorCode).defaultText(defaultMessage).build());

      Attachments

        Activity

          People

            kdonald Keith Donald
            rstoya05-aop Rossen Stoyanchev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: