Uploaded image for project: 'Tapestry'
  1. Tapestry
  2. TAPESTRY-1495

On a form including an Autocompleter and an EventListener, the Autocompleter required validation disappears after one async event

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 4.1.2
    • 4.1.7
    • XHR/dhtml/Ajax
    • None
    • tapestry-4.1.2-20070521, java 1.5.0_07-164, osx 10.4.9

    Description

      Create a form with client-side validation, include a required Autocompleter component, and then include some other component on which you attach an EventListener - a PropertySelection for instance. Make sure the EventListener is asynchronous and updates some component in the form other than the AutoCompleter - another PropertySelection, for instance.

      When you first load up this page, and try submitting, you will be told that the Autocompleter is required by the validation. Now choose something from the PropertySelection which invokes the EventListener. Try submitting again - the required validation will be gone on the Autocompleter.

      It doesn't matter what the other form components are - it's always the same. Any async event on the page which involves the form somehow will remove the validation from the Autocompleter. The problem seems to be just in the initializationscript of the response. Here's a real world example on page load:

      tapestry.form.registerProfile('editTimeEventForm',{"required":["timeType","project","categoryRadioGroup","stageRadioGroup","phase","description"],"timeType":

      {"required":["You must enter a value for Time Type."]}

      ,"project":

      {"required":["You must enter a value for Project."]}

      ,"categoryRadioGroup":

      {"required":["You must enter a value for Category."]}

      ,"stageRadioGroup":

      {"required":["You must enter a value for Stage."]}

      ,"phase":

      {"required":["You must enter a value for Phase."]}

      ,"description":{"required":["You must enter a value for Description."]}});

      and after an async event/response:

      tapestry.form.registerProfile('editTimeEventForm',{"required":["timeType","categoryRadioGroup","stageRadioGroup","phase","description"],"timeType":

      {"required":["You must enter a value for Time Type."]}

      ,"categoryRadioGroup":

      {"required":["You must enter a value for Category."]}

      ,"stageRadioGroup":

      {"required":["You must enter a value for Stage."]}

      ,"phase":

      {"required":["You must enter a value for Phase."]}

      ,"description":{"required":["You must enter a value for Description."]}});

      Note how "project" (the Autocompleter) has disappeared.

      Attachments

        Activity

          People

            Unassigned Unassigned
            woodj Julian Wood
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: