Re: TabbedPanel with AjaxSelfUpdatingTimerBehavior

2010-06-10 Thread Decebal Suiu
Hello Ernesto, I resolved the problem. The AjaxSelfUpdatingTimerBehavior was added by me on the panel returned by the ITab.getPanel() method. I put the behavior on a child of the tab panel and it works. Do you have an explanation why I retrieve PageExpiredException: No behavior listener found

Re: TabbedPanel with AjaxSelfUpdatingTimerBehavior

2010-06-10 Thread Ernesto Reinaldo Barreiro
Decebal, I think TabbedPanel works by replacing the active panel with the result of ITab.getPanel: see method setSelectedTab(int index). So, when you click on a tab the previous one is removed form the component tree (and therefore TimerAjaxCallBacks are not able to find the component). Have you

Re: TabbedPanel with AjaxSelfUpdatingTimerBehavior

2010-06-08 Thread Decebal Suiu
I tried your advice and I keep the timer behavior outside the tab, in MyTabbedPanel. In the refreshable panel I register a listener with MyApplication.get().addRefreshableComponent(Duration,Component). When I select the tab with the refreshable panel all works fine but when I switch the tab I

Re: TabbedPanel with AjaxSelfUpdatingTimerBehavior

2010-06-08 Thread Ernesto Reinaldo Barreiro
What I meant was to have a unique timer behavior attached to something like MyTimerTabbedPanel wicket:panel div wicket:id=timerContext/div div wicket:id=tabs/div /wicket:panel and you attach your timer to timerContext. Then you create an interface like ITimerListener { boolean

Re: TabbedPanel with AjaxSelfUpdatingTimerBehavior

2010-06-08 Thread Decebal Suiu
Hello Ernesto I understood now. I single AbstractAjaxTimerBehavior on timerContext component and onTimer I will iterate through all visible components from TabbedPanel that implements ITimerListener. One problem is that DashboardsTab (for example) contains many auto refreshable widget panels

Re: TabbedPanel with AjaxSelfUpdatingTimerBehavior

2010-06-08 Thread Ernesto Reinaldo Barreiro
Hi Decebal, Was just an idea you will have to adapt it to your needs... It would be interesting to see why your original setting is not working: as I only was guessing an explanation which might be wrong. Best, Ernesto On Tue, Jun 8, 2010 at 3:57 PM, Decebal Suiu decebal.s...@asf.ro wrote:

Re: TabbedPanel with AjaxSelfUpdatingTimerBehavior

2010-06-07 Thread Decebal Suiu
When I switch to other tab I received a PageExpiredException: org.apache.wicket.protocol.http.PageExpiredException: No behavior listener found with behaviorId 0; Component: [MarkupContainer [Component id = panel]] Any idea how can I remove/stop the AjaxSelfUpdatingTimerBehavior? I created a

Re: TabbedPanel with AjaxSelfUpdatingTimerBehavior

2010-06-07 Thread Ernesto Reinaldo Barreiro
Why not put the behavior outside the tab and just do something if you are on the wight tab? Ernesto On Mon, Jun 7, 2010 at 3:07 PM, Decebal Suiu decebal.s...@asf.ro wrote: When I switch to other tab I received a PageExpiredException: org.apache.wicket.protocol.http.PageExpiredException: No

Re: TabbedPanel with AjaxSelfUpdatingTimerBehavior

2010-06-07 Thread Ernesto Reinaldo Barreiro
I meant right tab On Mon, Jun 7, 2010 at 3:54 PM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: Why not put the behavior outside the tab and just do something if you are on the wight tab? Ernesto On Mon, Jun 7, 2010 at 3:07 PM, Decebal Suiu decebal.s...@asf.ro wrote: When I switch

Re: TabbedPanel with AjaxSelfUpdatingTimerBehavior

2010-06-07 Thread Decebal Suiu
Thanks, I will try. The problem with your approach is that in our application each tab is a section that can be added using spring framework (modular architecture). For example the dashboards tab has many widget panels, each widget panel is auto refreshable (different time for different widget).

Re: TabbedPanel with AjaxSelfUpdatingTimerBehavior

2010-06-07 Thread Ernesto Reinaldo Barreiro
I mean to have the timer attached to a component that is a sibling of the tab. You could register component as listener of this behavior and have the timer ask the components if the have changes to repaint. I´m not sure but the problem you have might happen as follows: 1-When you switch tabs you