Tapestry 5
  1. Tapestry 5
  2. TAP5-1628

Have Submit documentation explicitly state when the disabled attribute is evaluated

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 5.3
    • Fix Version/s: 5.3
    • Component/s: documentation
    • Labels:

      Description

      The "disabled" attribute for a Submit button is currently loosely documented as :

      " ... Further, a disabled field ignores any value in the request when the form is submitted."

      http://tapestry.apache.org/5.3/apidocs/org/apache/tapestry5/corelib/components/Submit.html

      I would like it to be more explicit, along the lines of:

      " ... Further, if bound, the disabled attribute is re-evaluated upon form submission and the "selected" event is only fired should it evaluate to 'false'."

      For this stumped us in work today for a good half hour - it was because we weren't @Persist'ing our disabled attribute. Our expression was t:disabled="!myObject" and of course 'myObject' because null / false on form submission. As our submit button was enabled and the form submitted, we saw no reason for the event not to fire.

        Activity

        Bob Harner made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Bob Harner made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Bob Harner [ bobharner ]
        Fix Version/s 5.3 [ 12316024 ]
        Resolution Fixed [ 1 ]
        Steve Eynon made changes -
        Field Original Value New Value
        Description The "disabled" attribute for a Submit button is currently loosely
        documented as :

        " ... Further, a disabled field ignores any value in the request when
        the form is submitted."

        http://tapestry.apache.org/5.3/apidocs/org/apache/tapestry5/corelib/components/Submit.html

        I would like it to be more explicit, along the lines of:

        " ... Further, if bound, the disabled attribute is re-evaluated upon
        form submission and the "selected" event is only fired should it
        evaluate to 'false'."

        For this stumped us in work today for a good half hour - it was
        because we weren't @Persist'ing our disabled attribute. Our expression
        was t:disabled="!myObject" and of course 'myObject' because null /
        false on form submission. As our submit button was enabled and the
        form submitted, we saw no reason for the event not to fire.
        The "disabled" attribute for a Submit button is currently loosely documented as :

        " ... Further, a disabled field ignores any value in the request when the form is submitted."

        http://tapestry.apache.org/5.3/apidocs/org/apache/tapestry5/corelib/components/Submit.html

        I would like it to be more explicit, along the lines of:

        " ... Further, if bound, the disabled attribute is re-evaluated upon form submission and the "selected" event is only fired should it evaluate to 'false'."

        For this stumped us in work today for a good half hour - it was because we weren't @Persist'ing our disabled attribute. Our expression was t:disabled="!myObject" and of course 'myObject' because null / false on form submission. As our submit button was enabled and the form submitted, we saw no reason for the event not to fire.
        Steve Eynon created issue -

          People

          • Assignee:
            Bob Harner
            Reporter:
            Steve Eynon
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development