Am 29.06.2009 um 10:22 schrieb Tokalak Ahmet:
Hi Wicketians,
i have a problem with AjaxSelfUpdatingTimerBehavior.
I have added an AjaxSelfUpdatingTimerBehavior to a page, because of
a background-thread running very long and the
page checks (an AjaxSelfUpdatingTimerBehavior with 10 sec interval
added at thread start to page) for the termination of the thread and
showing the results of thread.
It is in theory possible to leave the page while the background
thread is running and come back to it at a later time.
But in practice it isn't possible to leave it, the behavior reloads
the page again and again until the thread ends and the behavior is
removed from the page.
In theory, practice is always easy :-)
Though I don't quite understand your problem.
The ASUTB generates some JavaScript that instructs the Browser to fire
an AjaxRequest right back to that Behavior on the Server.
If the user leaves the page (on the browser) this JavaScript is
disabled, no more calls to the browser.
If the user comes back to that page, even if it is loaded from the
browser cache, those Ajax-calls start again.
Look at the clock example of the ajax examples in the wicket examples.
Also the AjaxRequest doesn't reload the whole page, it just reloads
the components that are added to the target in the overridden
'onTimer' method.
To stop the Timer a removal is not needed, a call to its 'stop()'
method does the same trick.
Hopefully this helps, if not, come back,
mf
Any idea how to solve this problem?
Thank you in advance.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]