wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Grigorov <mgrigo...@apache.org>
Subject Re: wicket abort ajax handling of multipart form when the server is stopped
Date Tue, 24 Mar 2015 21:28:02 GMT
Hi,

I cannot reproduce the problem.
The iframe with the "Connection error" content is indeed loaded but
wicket-ajax-jquery.js' #handleMultipartComplete() is called (i.e. 'load'
event is fired).
Then onFailure() [1] is called and finally Channel#done() [2] is called to
release it.
I don't see why it hangs for you.

1.
https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js#L951
2.
https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js#L978

Martin Grigorov
Freelancer, available for hire!
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Tue, Mar 24, 2015 at 11:46 AM, Martin Grigorov <mgrigorov@apache.org>
wrote:

> Hi,
>
> Please file a ticket at our JIRA.
> We should improve this. E.g. by calling #onFailure() if the iframe doesn't
> load after some timeout (jQuery#ajax()'s timeout).
>
> Martin Grigorov
> Freelancer, available for hire!
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Tue, Mar 24, 2015 at 7:01 AM, ywtsang <ywtsang@gmail.com> wrote:
>
>> in normal case, I have tested that wicket ajax multipart form submit event
>> can be triggered properly in this sequence
>>
>>   onbefore
>>   onprecondition
>>   onbeforesend
>>   onafter
>>   onsucess
>>   oncomplete
>>
>> but when the server is stopped and the same ajax multipart form is
>> submitted, only these events are triggered
>>
>>   onbefore
>>   onprecondition
>>   onbeforesend
>>   onafter
>>
>> i.e. the onfaliure, oncomplete are not called
>>
>> and the browser is just "hanged" and the wicket js is waiting forever for
>> "load.handleMultipartComplete" from the upload iframe, i.e. this ajax form
>> submit is not completed and further ajax event will be just queued
>>
>> from the firebug console, the iframe html can be found as:
>>
>>
>>
>> the html inside the iframe simply means "Connection Error"
>>
>> so how can I proceed to handle this problem?
>>
>> --
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/wicket-abort-ajax-handling-of-multipart-form-when-the-server-is-stopped-tp4670076.html
>> Sent from the Users forum mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>

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