Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-4939

AbstractAjaxTimerBehavior never triggers if attached to WebPage

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 6.4.0
    • 6.5.0
    • wicket
    • None

    Description

      Since WICKET-4886 was fixed, AbstractAjaxTimerBehavior never triggers anymore if it is added the the page itself.
      See: org.apache.wicket.ajax.AbstractAjaxTimerBehavior.shouldTrigger()
      getComponent().findParent(WebPage.class) != null
      is always false in that case, which seems to be wrong. It should also be ok if the component itself is the WebPage.
      So, the method should probably read something like

      private boolean shouldTrigger()

      { return isStopped() == false && isEnabled(getComponent()) && (getComponent().findParent(WebPage.class) != null || getComponent() instanceof WebPage); }

      Temporary workaround:
      add the AbstractAjaxTimerBehavior to a subcomponent of the page instead.

      Attachments

        Activity

          People

            mgrigorov Martin Tzvetanov Grigorov
            jonas Jonas
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: