Wicket
  1. Wicket
  2. WICKET-4429

executeAllTimerBehaviors does not find all timer behaviours

    Details

      Description

      WicketTester tester = new WicketTester();
      tester.startPage(WaitPage.class);
      tester.assertRenderedPage(WaitPage.class);
      tester.executeAllTimerBehaviors(tester.getLastRenderedPage());

      public WaitPage() {
      Label message = new Label("message", "Please wait ..");
      add(message);

      add(new AjaxSelfUpdatingTimerBehavior(Duration.milliseconds(1000)) {

      @Override
      protected void onPostProcessTarget(AjaxRequestTarget target) {
      // wait for background thread to complete
      // if (task.isDone())

      { ... stop(); setResponsePage(NextPage.class); }

      });

      The timer does not fire.
      Problem 1: The code looks for MarkupContainers
      Problem 2: The code looks for AjaxSelfUpdatingTimerBehavior but should look for AbstractAjaxTimerBehavior

        Activity

        Lasse Lindgård created issue -
        Hide
        Lasse Lindgård added a comment -

        A simple example and a unit test

        Show
        Lasse Lindgård added a comment - A simple example and a unit test
        Lasse Lindgård made changes -
        Field Original Value New Value
        Attachment AjaxSelfUpdatingTimerBehavior_test.zip [ 12515919 ]
        Hide
        Lasse Lindgård added a comment -

        Problem 2: AjaxSelfUpdatingTimerBehavior only applies to 1.4.x

        Show
        Lasse Lindgård added a comment - Problem 2: AjaxSelfUpdatingTimerBehavior only applies to 1.4.x
        Martin Grigorov made changes -
        Fix Version/s 6.0.0 [ 12315431 ]
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Martin Grigorov [ mgrigorov ]
        Fix Version/s 1.4.20 [ 12318545 ]
        Fix Version/s 1.5.5 [ 12319052 ]

          People

          • Assignee:
            Martin Grigorov
            Reporter:
            Lasse Lindgård
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development