Hi Martin,

> Few more questsions:
>
> 1. By specification, is decorateOnFailureScript invoked when ajax-call
> fails over network?
>
>
I'm not 100% sure, nothing about that is said on the Javadoc, but I know it
its called when server is unreachable.


> 2. How can I set the ajax timeout, for example "fail after trying for
> 5 seconds" ?
>
> Don't know the answer... If I would be you I'll try to look at
wicket-ajax.js and try to see how things are implemented there..


> 3. "JavaScript to relaunch AJAX"
> What do you recommend here? Recursively calling for example
> button.onClick()?
>
>
What you do here might depend on your exact use case. But somehow you have
to use setTimeout combined with wicketAjaxGet and the URL to the component
which will be used to update page via AJAX.

Best,

Ernesto



> **
> Martin
>
> 2009/10/4 Ernesto Reinaldo Barreiro <[email protected]>:
> > Maybe you could use IAjaxCallDecorator, e.g.
> >
> > public class MyCallDecorator implements IAjaxCallDecorator {
> > ....
> > public CharSequence decorateOnFailureScript(CharSequence script) {
> >  return script + ";alert('Server down!');" + "JavaScript to relaunch
> AJAX";
> > }
> > }
> >
> > Ernesto
> >
> > On Sun, Oct 4, 2009 at 12:10 PM, Martin Makundi <
> > [email protected]> wrote:
> >
> >> Hi!
> >>
> >> If we build an ajax GUI, we would like to detect "network problems"
> >> and give graceful errors and maybe retry (like gmail tries to do).
> >>
> >> How would it be possible to detect and set these network timeout
> >> limits with wicket, and probably allow invoking "retry" ('automatic'
> >> retry after notifying the user)?
> >>
> >> **
> >> Martin
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [email protected]
> >> For additional commands, e-mail: [email protected]
> >>
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to