Uploaded image for project: 'Struts 1'
  1. Struts 1
  2. STR-3066

Cancellation to prevent form population

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.1.0
    • Fix Version/s: 1.4.x
    • Component/s: Core
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: All
    • Bugzilla Id:
      22357

      Description

      I have never come across one user mail or program code where people are retrieving values on cancellation. Is there any framework which allows this anyway? I categorize this as an irregular practice that should not be supported – and the current situation is an oversight. The action is canceled, the form is part of the action, and so the form has no job which is very much implied by the canceling of validation.

      The main issue at hand is that a developer may mistakenly believe all form data is always validated. If a form is configured for validation, and the submission goes through "canceled", the form is still populated. The guarantee for validated data, however, is absent.

      Due to backwards compatibility concern, I recommend one of two solutions
      1) A skipPopulationOnCancel property on AbstractPopulateForm (defaults to true)
      2) Rework STR-286 to include a populate cancel option (not a default).

        Attachments

          Activity

            People

            • Assignee:
              pbenedict Paul Benedict
              Reporter:
              pbenedict Paul Benedict
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: