Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-4595

Validators can no longer retrieve messages from property files for ModelDriven objects.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.20
    • Fix Version/s: 2.3.28, 2.5
    • Component/s: XML Validators
    • Labels:
      None

      Description

      I have a Action with a VistorFieldValidator for my ModelDriven object (Model.class), prior to version 2.3.20 the RequiredStringValidator looked up the message in the Model.properties file. Since 2.3.20 the validators can no longer retrieve messages from property files for the ModelDriven object. The DelegatingValidatorContext always returns the TextProvider for the Action instead of the ModelDriven object in the makeTextProvider method.

      The DelegatingValidatorContext was changed in WW-4202.

      I would submit a patch but I'm not sure of the correct behavior.

      Example app with test case is here https://github.com/RLStokes/struts2-modeldriven.

      The tests pass with struts 2.3.15.1 they fail with 2.3.20.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                lukaszlenart Lukasz Lenart
                Reporter:
                avsdude Rob Stokes
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: