wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maxim Solodovnik <solomax...@gmail.com>
Subject Re: WebSocket close is being called if AjaxDownloader is used
Date Thu, 03 Nov 2016 08:08:37 GMT
>> Maxim said: websocket.close() triggers the ajax download.
Nope, sorry for my English

I said
   For some reason at the moment download is initiated
   WebSocketBehavior::onClose is being called ....

so user clicks "Download", and then, as the result WebSocket#onClose() is
being called
I would really like to work-around this

On Thu, Nov 3, 2016 at 3:04 PM, Martin Grigorov <mgrigorov@apache.org>
wrote:

> On Thu, Nov 3, 2016 at 8:46 AM, Sven Meier <sven@meiers.net> wrote:
>
> > AjaxDownload changes the window location - the browser probably prepares
> > unloading of the page, before opening the attached download in a separate
> > window.
> >
>
> This could be the reason but it is the other way around of what Maxim
> explained in his first email.
>
> Maxim said: websocket.close() triggers the ajax download.
>
> Sven's explanation is valid when: the user click the download link, the
> browser does 'location.href=...', the browser triggers 'window.unload' and
> this leads to WebSocket.close() on the client side, the last triggers
> WebSocket#onClose() at the server side
>
>
> >
> > Sven
> >
> >
> >
> > Am 03.11.2016 um 08:33 schrieb Martin Grigorov:
> >
> >> Hi Maxim,
> >>
> >> I don't see any relation between those.
> >> If it is easy to reproduce please create a quickstart.
> >>
> >> Martin Grigorov
> >> Wicket Training and Consulting
> >> https://twitter.com/mtgrigorov
> >>
> >> On Thu, Nov 3, 2016 at 4:16 AM, Maxim Solodovnik <solomax666@gmail.com>
> >> wrote:
> >>
> >> Hello,
> >>>
> >>> Recently we found weird behavior of AjaxDownloader (similar to this [1]
> >>> one)
> >>> For some reason at the moment download is initiated
> >>> WebSocketBehavior::onClose is being called ....
> >>> What is the reason for this?
> >>>
> >>>
> >>> https://cwiki.apache.org/confluence/display/WICKET/
> >>> AJAX+update+and+file+download+in+one+blow
> >>>
> >>> --
> >>> WBR
> >>> Maxim aka solomax
> >>>
> >>>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>



-- 
WBR
Maxim aka solomax

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message