Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-6945

MultipartFormComponentListener modifies enctype on invisible forms, leading to javascript errors

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 10.0.0-M1, 8.14.0, 9.8.0
    • wicket-core
    • None

    Description

      MultipartFormComponentListener is tasked with updating the form 'enctype' property in the browser when components' visibility change.
      This is required in some cases because a form could become url-encoded or multi-part, depending on the fields present.
      The feature was introduced in response to WICKET-6914.

      A subsequent fix was made to the (enabled by default in all Wicket applications) listener to support hidden forms.
      Trying to set the enctype property of invisible forms in the browser resulted in javascript errors.
      The fix was submitted to fix WICKET-6921.

      The form visibility problem still occurs in a specific scenario. When a form visibility is modified during the onConfigure phase,
      the listener emits statements related to forms that have just been made invisible.
      This happens because the code in the listener is hooked to the onBeforeRespond phase.

      Evaluating the forms visibility in onAfterRespond allows the listener to visit all visible children and allows visibility modification during the onConfigure phase.

      Attachments

        Issue Links

          Activity

            People

              mgrigorov Martin Tzvetanov Grigorov
              mat128 Mathieu Mitchell
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: