I post my solution just in case someone else finds it useful.

    I've created a copy of AbstractAjaxTimerBehavior and added the methods
in AjaxSelfUpdatingTimerBehavior. Then I added a start method:

public final void start(final AjaxRequestTarget target) {
        stopped = false;
        target.getHeaderResponse().renderOnLoadJavascript(
                                                   
getJsTimeoutCall(updateInterval));
}

    In the onClick() of the AjaxLink that opens the ModalWindow, I call
behavior.stop(), then in the close of the ModalWindow, I call
behavior.start(target).
    Seems to be working ok so far.

Hope this helps,

Daniel



dtoffe wrote:
> 
> Hi,
> 
>     Is there an easy way of stopping an AjaxSelfUpdatingTimerBehavior when
> a ModalWindow is opened, and restarting it again when the modal is closed
> ??
>     AbstractAjaxTimerBehavior provides a stop() method, but not a
> (re)start, I would like to know if it is possible to get the desired
> functionality only by overriding some methods, or if I need to do a
> customized rewrite of that class.
> 
> tia,
> 
> Daniel
> 
> 

-- 
View this message in context: 
http://www.nabble.com/AjaxSelfUpdatingTimerBehavior-and-ModalWindow-tp22202102p22225064.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to