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

problem with Checkbox + custom validators

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.1.1
    • 4.1.2
    • Framework
    • None

    Description

      I have a Checkbox component which has a custom validator. The validator requires the checkbox to be in checked state under certain circumstances.

      My problem is the following:
      1. the checkbox is checked
      2. the user unchecks it and submits the form
      3. after the resulting page is rendered, the validation message is rendered as expected BUT the checkbox will be checked!

      The cause of the problem is that Checkbox doesn't record the newly submitted value in the validation delegate.
      For example TextField does this task indirectly by calling TranslatedFieldSupport.parse(), and the recorded value is read indirectly by TranslatedFieldSupport.format().

      Proposed solution: call the delegate's getFieldInputValue() and recordFieldInputValue() methods.

      Regards:
      Norbi

      Attachments

        1. Checkbox.patch
          1 kB
          Norbert Sándor

        Activity

          People

            jkuhnert Jesse Kuhnert
            snorbi Norbert Sándor
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: