Wicket
  1. Wicket
  2. WICKET-5082

Ajax update renders parent/child JS in different order than initial Page render

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 6.6.0
    • Fix Version/s: 6.7.0
    • Component/s: None
    • Labels:
      None

      Description

      See attached quickstart. On initial page load, the child Javascripts are rendered and executed first, followed by the parent's JS - in this case a Datatables.net JS. Everything works fine.

      However, if you click on a link in the DefaultDataTable, we trigger a DDT refresh via Ajax, and then you can see that the parent's JS is executed first, before the child JS - this causes a problem since the parent JS modifies the visible rows in the table and Wicket can no longer find some of the child rows.

      I expected the order of JS contributions to be the same for initial page render and any Ajax updates.

      1. wicket-5082.patch
        4 kB
        Sven Meier
      2. quickstart.tar.gz
        95 kB
        Nick Pratt
      3. Change_order_of_Ajax_child_visitation.patch
        4 kB
        Nick Pratt

        Activity

        Sven Meier made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Sven Meier [ svenmeier ]
        Fix Version/s 6.7.0 [ 12323964 ]
        Resolution Fixed [ 1 ]
        Sven Meier made changes -
        Attachment wicket-5082.patch [ 12572414 ]
        Nick Pratt made changes -
        Nick Pratt made changes -
        Description See attached quickstart. On intiial page load, the child Javascripts are rendered and executed first, followed by the parent's JS - in this case a Datatables.net JS. Everything works fine.

        However, if you click on a link in the DefaultDataTable, we trigger a DDT refresh via Ajax, and then you can see that the parent's JS is executed first, before the child JS - this causes a problem since the parent JS modifies the visible rows in the table and Wicket can no longer find some of the child rows.

        I expected the order of JS contributions to be the same for initial page render and any Ajax updates.
        See attached quickstart. On initial page load, the child Javascripts are rendered and executed first, followed by the parent's JS - in this case a Datatables.net JS. Everything works fine.

        However, if you click on a link in the DefaultDataTable, we trigger a DDT refresh via Ajax, and then you can see that the parent's JS is executed first, before the child JS - this causes a problem since the parent JS modifies the visible rows in the table and Wicket can no longer find some of the child rows.

        I expected the order of JS contributions to be the same for initial page render and any Ajax updates.
        Nick Pratt made changes -
        Attachment quickstart.tar.gz [ 12572365 ]
        Nick Pratt made changes -
        Field Original Value New Value
        Affects Version/s 6.6.0 [ 12323963 ]
        Nick Pratt created issue -

          People

          • Assignee:
            Sven Meier
            Reporter:
            Nick Pratt
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development