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

Required FormComponents in enclosure tag are required if the enclosure is not visible

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • 8.0.0-M8
    • None
    • wicket
    • None

    Description

      There is two differents behaviors while validating a required (or another validator) FormComponent within an invisible enclosure tag.
      If the FormComponent is added with the 'add' method, the component is required.
      If the FormComponent is added with the 'queue' method, this works fine (component is not required)

      The latter behavior may be the one to have imo.

      Html : (see QuickStart)

      <form wicket:id="ze_form">
      	<div wicket:enclosure="ze_enclosured">
      	Enclosure added: <input type="text" wicket:id="ze_enclosured" />
      	<br />
      	Required added: <input type="text" wicket:id="ze_textfield" />
      	</div>
      
      	<span wicket:id="ze_feedback"></span>
      	<a wicket:id="ze_button">Submit with added Components</a>
      </form>
      
      • ze_enclosured is set to invisible
      • both formComponents are required
      • both formComponents are "added" (not queued)

      => Error on form submit : ze_textfield is required

      If we use "queue" : ok

      Attachments

        1. WicketQuickStartJira.war
          4.88 MB
          Palancher aurélien

        Activity

          People

            bitstorm Andrea Del Bene
            darkvadaure Palancher aurélien
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: