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

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0.RC1
    • Fix Version/s: 2.0.1
    • Labels:
      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

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

              Dates

              Created:
              Updated:
              Resolved: