Tapestry
  1. Tapestry
  2. TAPESTRY-678

LinkSubmit does not work correctly when the browser's back button is used and the form resubmitted normally

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0
    • Fix Version/s: 4.0
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      4.0b7

      Description

      Hello,

      I have a Form with 2 LinkSubmits, A and B.
      1. I click B, it works correctly
      2. I press the BACK button
      3. I click A, but it acts as I would have clicked B

      The browser seems to cache the value of the hidden fields associated with the LinkSubmits. When I go back, the hidden field of B already contains the 'T' value. In 3. the hidden field of A is set to the value 'T', too.

      This causes two LinkSubmits to be triggered. I checked it, the request parameter of both LinkSubmits contains 'T'.
      Because of this both LinkSubmits' listeners are triggered.

      Possible resolution: clear the value of the hidden fields in an initialization script.

      BR,
      Norbi

        Issue Links

          Activity

          Norbert Sándor created issue -
          Hide
          Nick Westgate added a comment -

          The same problem existed in T3, logged as issue:
          http://issues.apache.org/jira/browse/TAPESTRY-339

          Seems with T4 LinkSubmit has been rewritten, but
          not addressing the several issues (with solutions)
          already logged against it.

          Show
          Nick Westgate added a comment - The same problem existed in T3, logged as issue: http://issues.apache.org/jira/browse/TAPESTRY-339 Seems with T4 LinkSubmit has been rewritten, but not addressing the several issues (with solutions) already logged against it.
          Howard M. Lewis Ship made changes -
          Field Original Value New Value
          Assignee Howard M. Lewis Ship [ hlship ]
          Howard M. Lewis Ship made changes -
          Summary LinkSubmit does not work correctly when the BACK button is used LinkSubmit does not work correctly when the browser's back button is used and the form resubmitted normally
          Hide
          Howard M. Lewis Ship added a comment -

          The fix brought it back very closely to Richard (Lewis-Shell)'s original design; I moved some of the logic over into the FormSupportImpl class, however, and made the client-side JavaScript inside Form.js do more of the work.

          I built a test to verify that is was broken as described, then retested with the new code to ensure that the fix works, so my confidence is very high.

          Show
          Howard M. Lewis Ship added a comment - The fix brought it back very closely to Richard (Lewis-Shell)'s original design; I moved some of the logic over into the FormSupportImpl class, however, and made the client-side JavaScript inside Form.js do more of the work. I built a test to verify that is was broken as described, then retested with the new code to ensure that the fix works, so my confidence is very high.
          Howard M. Lewis Ship made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Closed [ 6 ]
          Fix Version/s 4.0 [ 10794 ]
          Howard M. Lewis Ship made changes -
          Link This issue is duplicated by TAPESTRY-339 [ TAPESTRY-339 ]
          Mark Thomas made changes -
          Workflow jira [ 12330595 ] Default workflow, editable Closed status [ 12569117 ]
          Mark Thomas made changes -
          Workflow Default workflow, editable Closed status [ 12569117 ] jira [ 12592097 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Closed Closed
          38d 18h 34m 1 Howard M. Lewis Ship 07/Nov/05 10:13

            People

            • Assignee:
              Howard M. Lewis Ship
              Reporter:
              Norbert Sándor
            • Votes:
              2 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development