You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Frank Bille Jensen (JIRA)" <ji...@apache.org> on 2008/04/12 22:54:04 UTC

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

Ability to enable/disable AbstractAjaxTimerBehavior
---------------------------------------------------

                 Key: WICKET-1525
                 URL: https://issues.apache.org/jira/browse/WICKET-1525
             Project: Wicket
          Issue Type: Improvement
            Reporter: Frank Bille Jensen
            Assignee: Frank Bille Jensen
            Priority: Minor
             Fix For: 1.5-M1


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.


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

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1525?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg updated WICKET-1525:
----------------------------------

    Fix Version/s: 1.5-M3
                       (was: 1.5-M2)

> 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-M3
>
>         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.


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

Posted by "Kaspar Fischer (JIRA)" <ji...@apache.org>.
    [ 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.


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

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1525?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg updated WICKET-1525:
----------------------------------

    Fix Version/s: 1.5-M2
                       (was: 1.5-M1)

> 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-M2
>
>         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.


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

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1525?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov updated WICKET-1525:
------------------------------------

    Attachment: WICKET-1525.patch

Improve the patch and provide a WicketTester test for the new method.

> 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.


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

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1525?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov updated WICKET-1525:
------------------------------------

    Attachment: quickstart.tgz
                WICKET-1525.patch

A patch as proposed by Frank and a quickstart to test it.

@Devs: please take a look and tell me if it is OK. If it is then I'll modify the quickstart to a WicketTester test and add comments to the new methods.

> 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
>
>
> 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.


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

Posted by "Jeremy Thomerson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1525?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeremy Thomerson updated WICKET-1525:
-------------------------------------

    Fix Version/s:     (was: 1.5-M3)
                   1.5-M4

> 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-M4
>
>         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.


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

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12776909#action_12776909 ] 

Martin Grigorov commented on WICKET-1525:
-----------------------------------------

Thanks for the feedback Kaspar!

The check for 'null' is no harm but in which cases 'target' is null for you ? 

> 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.


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

Posted by "Kaspar Fischer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12776913#action_12776913 ] 

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

I my case, the timer is restarted when a form is submitted - but not using AJAX (it's not an AJAX form). In this case, target is null because there is no AjaxRequestTarget then.

> 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.


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

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12772217#action_12772217 ] 

Igor Vaynberg commented on WICKET-1525:
---------------------------------------

i would like to hold off on these kinds of changes for as long as possible, just trying to keep the 1.5.x and 1.4.x as similar as possible while we have to patch both. just a heads up so you dont think we have forgotten about the patch. cheers.

> 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.


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

Posted by "Frank Bille Jensen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1525?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Frank Bille Jensen updated WICKET-1525:
---------------------------------------

    Component/s: wicket

> 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
>
>
> 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.