Re: Is it possible to restart an AjaxSelfUpdatingBehaviour after it has been stopped?

2009-07-24 Thread CrocodileShoes
Thanks Daniel, I've just tried this and it's not worked. Obviously it's a slightly different use case, that is, changing tabs and popping up a modal window but I'd hoped it would work. It turns out that the stopped flag is not actually set to true. That's why your method doesn't work. When I

Re: Is it possible to restart an AjaxSelfUpdatingBehaviour after it has been stopped?

2009-07-24 Thread dtoffe
Hi, First, let's see if we are talking about the same code, here is the actual code I use: import org.apache.wicket.Page; import org.apache.wicket.RequestCycle; import org.apache.wicket.ajax.AbstractDefaultAjaxBehavior; import org.apache.wicket.ajax.AjaxRequestTarget; import

Re: Is it possible to restart an AjaxSelfUpdatingBehaviour after it has been stopped?

2009-07-24 Thread CrocodileShoes
Hi, No it's definitely not that. I tried your class to be sure and it still doesn't work. I've done some more debugging with Firefox's Firebug and discovered that when I switch back to the tab with the updating behaviour it does not contain the evaluate part. I'll print this, it's easier:

Re: Is it possible to restart an AjaxSelfUpdatingBehaviour after it has been stopped?

2009-07-24 Thread CrocodileShoes
Yeah, the headRendered flag is still set to true so the JsTimeout call is never rendered. I'm not sure why it's was removed in the first place, perhaps it's something to do with the precondition? CrocodileShoes wrote: Hi, No it's definitely not that. I tried your class to be sure and it

Is it possible to restart an AjaxSelfUpdatingBehaviour after it has been stopped?

2009-07-23 Thread Doyle, Mark
I have a collection of Panels that are switched via an AjaxTabbedPanel Component. One of the panels has an AjaxSelfUpdatingBehaviour attached which works fine. However, if I switch to another panel the self updating behaviour is stopped because the component is no longer visible (a precondition

Re: Is it possible to restart an AjaxSelfUpdatingBehaviour after it has been stopped?

2009-07-23 Thread Igor Vaynberg
cant you add the behavior directly to the panel? -igor On Thu, Jul 23, 2009 at 7:24 AM, Doyle, Markmark.do...@logica.com wrote: I have a collection of Panels that are switched via an AjaxTabbedPanel Component.  One of the panels has an AjaxSelfUpdatingBehaviour attached which works fine.  

Re: Is it possible to restart an AjaxSelfUpdatingBehaviour after it has been stopped?

2009-07-23 Thread CrocodileShoes
Well I was adding this behaviour in the constructor of the Panel, i.e. this.add(new AjaxSelfUpdatingBehaviour(...)); which I assumed resulted in the same effect. I have just changed it to the following (see below) and now get a null pointer when the behaviour tries to update the panel after I

Re: Is it possible to restart an AjaxSelfUpdatingBehaviour after it has been stopped?

2009-07-23 Thread Igor Vaynberg
hm, not really sure. maybe you can try rolling your own behavior and customize it to your exact needs. -igor On Thu, Jul 23, 2009 at 8:09 AM, CrocodileShoesmark.do...@logica.com wrote: Well I was adding this behaviour in the constructor of the Panel, i.e. this.add(new

Re: Is it possible to restart an AjaxSelfUpdatingBehaviour after it has been stopped?

2009-07-23 Thread dtoffe
Hi, Also take a look at this thread: http://www.nabble.com/AjaxSelfUpdatingTimerBehavior-and-ModalWindow-to22202102.html I don't mean it's a correct or better solution, but so far it works for me. Hth, Daniel CrocodileShoes wrote: Well I was adding this behaviour in the