Yes, JavaScript setTimeOut()... If your script fails the make a setTimeOut
combined with a wicket wicketAjaxGet... Example

 this.dd.onDragDrop = function(e, id) {
        wicketAjaxGet(this.url+ '&sourceId=' + this.getEl().id +
'&targetId=' + id);
    }

This URL was generated by "Wicket" an points back to a behavior that will
repaint some component (when some drag and drop occurs) .

If you need I can send you full references to the code where I use such
technique.

Best,

Ernesto

P.S. There was some article on "jWeekend" site explaining how to use wicket
AJAX but I do not have the reference at hand... If you seacrh the list
probably it will pop out.



> > 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.
>
> Which particular setTimeout you mean, javaScript setTimeout("..", nn);
> or something else ?
>


> I didn't quite catch your thought here.
>
> Should I have a look at some wicket example where an ajax request is
> invoked "manually"? Or something? I really don't know what function to
> call and with what arguments to re-try the request if "button.onclick"
> is not recommended.
>
> **
> Martin
>
> >
> >
> >
> >> **
> >> 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]
> >>
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to