You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Kaspar Fischer (JIRA)" <ji...@apache.org> on 2009/11/12 09:21:39 UTC

[jira] Commented: (WICKET-1525) Ability to enable/disable AbstractAjaxTimerBehavior

    [ https://issues.apache.org/jira/browse/WICKET-1525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12776904#action_12776904 ] 

Kaspar Fischer commented on WICKET-1525:
----------------------------------------

I have the same requirement and am using your patch.

One small addition: The restart() method currently only works from within an AJAX request but changing it to

/**
   * Re-enables the timer if already stopped
   * 
   * @param target the AJAX request target, or null in case this method is call from outside an AJAX request
   */
  public final void restart(final AjaxRequestTarget target)
  {
    if (stopped)
    {
      stopped = false;
      headRendered = false;
      if (target != null)
      {
        target.addComponent(getComponent());
      }
    }
  }

At least, this works for me.

> Ability to enable/disable AbstractAjaxTimerBehavior
> ---------------------------------------------------
>
>                 Key: WICKET-1525
>                 URL: https://issues.apache.org/jira/browse/WICKET-1525
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>            Reporter: Frank Bille Jensen
>            Assignee: Frank Bille Jensen
>            Priority: Minor
>             Fix For: 1.5-M1
>
>         Attachments: quickstart.tgz, WICKET-1525.patch, WICKET-1525.patch
>
>
> Convert the existing "stop" functionality into using the isEnabled() method on IBehavior. This would make it possible to disable and enable a timer.
> (The stop method was added before[R490397] IBehavior got the isEnabled method[510198])

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.