Tapestry
  1. Tapestry
  2. TAPESTRY-1198

problem with Checkbox + custom validators

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.1.1
    • Fix Version/s: 4.1.2
    • Component/s: Framework
    • Labels:
      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

      1. Checkbox.patch
        1 kB
        Norbert Sándor

        Activity

        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12569248 ] jira [ 12590500 ]
        Mark Thomas made changes -
        Workflow jira [ 12392725 ] Default workflow, editable Closed status [ 12569248 ]
        Jesse Kuhnert made changes -
        Fix Version/s 4.1.2 [ 12312202 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Assignee Jesse Kuhnert [ jkuhnert ]
        Norbert Sándor made changes -
        Field Original Value New Value
        Attachment Checkbox.patch [ 12347445 ]
        Norbert Sándor created issue -

          People

          • Assignee:
            Jesse Kuhnert
            Reporter:
            Norbert Sándor
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development