You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Alec Swan <al...@gmail.com> on 2012/01/08 20:29:19 UTC

AJAX upload in modal window hangs when file size is too large @L

Hello,

I have an upload form which uploads files using AJAX.

When the file size is less than maxUploadSize the form work correctly
on the page and modal window.

When file size is greater than maxUploadSize then form works correctly
and displays an error on the page, but hangs in modal window after
"INFO: Invoking pre-call handler(s)..." and before "INFO: Response
parsed. Now invoking steps...".

What could be the reason for AJAX upload request to hang in modal
window when the file uploaded is too large?

Thanks,

Alec

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: AJAX upload in modal window hangs when file size is too large @L

Posted by Alec Swan <al...@gmail.com>.
I just compared HTTP traces between AJAX-uploading a small file and
large file and noticed that in both cases the same POST call is made
from the client. However, with small file upload POST result returns
quickly with status 200 and with large file the POST call never
returns.

When I pause my debugging session I can see that the code is blocking
in WebResponse#write(AppendingStringBuffer asb).

Why would the AJAX-upload POST hang?

Thanks,

Alec

On Tue, Jan 10, 2012 at 11:55 AM, Alec Swan <al...@gmail.com> wrote:
> Correct, the client does not complete even though my server code
> execution finishes.
>
> There are no Javascript errors. It is possible that the info window is
> not a part of the DOM but I don't know how to verify that.
>
> The problem is caused by adding a component from the parent page to
> ART during AJAX upload. And it's only broken in a modal window during
> very large uploads!
>
> I enabled Wicket debug logging and noticed different messages logged
> during upload from modal window and regular page. Here is the first
> line that is different:
> Modal: org.apache.wicket.MarkupContainer - Add _header_ to [Page class
> = MyPage, id = 3, version = 0, ajax = 2]
> Page: org.apache.wicket.MarkupContainer - Add _header_ to [Page class
> = MyPage, id = 4, version = 0]
>
> Does "ajax = 2" have any significance here?
>
> Thanks,
>
> Alec
>
> On Tue, Jan 10, 2012 at 10:49 AM, Doug Leeper <do...@yahoo.com> wrote:
>> I am assuming what you mean by hanging is that the call on the client browser
>> doesn't complete or is interrupted for some reason.  The hanging is not
>> occurring on the server side...correct?
>>
>> Are there any javascript errors?  I ask b/c you indicated:
>>
>> "INFO: Invoking pre-call handler(s)..." and before "INFO: Response  parsed.
>> Now invoking steps...".
>>
>> Could be that the info window is not there in the DOM any more?
>>
>> Not that these are answers but steps I would like to solving this problem.
>>
>> --
>> View this message in context: http://apache-wicket.1842946.n4.nabble.com/AJAX-upload-in-modal-window-hangs-when-file-size-is-too-large-L-tp4276504p4282736.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
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: AJAX upload in modal window hangs when file size is too large @L

Posted by Alec Swan <al...@gmail.com>.
Correct, the client does not complete even though my server code
execution finishes.

There are no Javascript errors. It is possible that the info window is
not a part of the DOM but I don't know how to verify that.

The problem is caused by adding a component from the parent page to
ART during AJAX upload. And it's only broken in a modal window during
very large uploads!

I enabled Wicket debug logging and noticed different messages logged
during upload from modal window and regular page. Here is the first
line that is different:
Modal: org.apache.wicket.MarkupContainer - Add _header_ to [Page class
= MyPage, id = 3, version = 0, ajax = 2]
Page: org.apache.wicket.MarkupContainer - Add _header_ to [Page class
= MyPage, id = 4, version = 0]

Does "ajax = 2" have any significance here?

Thanks,

Alec

On Tue, Jan 10, 2012 at 10:49 AM, Doug Leeper <do...@yahoo.com> wrote:
> I am assuming what you mean by hanging is that the call on the client browser
> doesn't complete or is interrupted for some reason.  The hanging is not
> occurring on the server side...correct?
>
> Are there any javascript errors?  I ask b/c you indicated:
>
> "INFO: Invoking pre-call handler(s)..." and before "INFO: Response  parsed.
> Now invoking steps...".
>
> Could be that the info window is not there in the DOM any more?
>
> Not that these are answers but steps I would like to solving this problem.
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/AJAX-upload-in-modal-window-hangs-when-file-size-is-too-large-L-tp4276504p4282736.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
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: AJAX upload in modal window hangs when file size is too large @L

Posted by Doug Leeper <do...@yahoo.com>.
I am assuming what you mean by hanging is that the call on the client browser
doesn't complete or is interrupted for some reason.  The hanging is not
occurring on the server side...correct?

Are there any javascript errors?  I ask b/c you indicated:

"INFO: Invoking pre-call handler(s)..." and before "INFO: Response  parsed.
Now invoking steps...". 

Could be that the info window is not there in the DOM any more?

Not that these are answers but steps I would like to solving this problem.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/AJAX-upload-in-modal-window-hangs-when-file-size-is-too-large-L-tp4276504p4282736.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


Re: AJAX upload in modal window hangs when file size is too large @L

Posted by Alec Swan <al...@gmail.com>.
Commenting out the first line in the code below fixes the problem but
I don't understand why the fix works.

Note that get("infoFeedback") returns feedback panel of the modal
window page - and not of the upload form. The filter of the feedback
panel uses http://www.jeremythomerson.com/blog/2011/01/catching-all-feedback-messages-that-arent-rendered-by-other-feedback-panels/
approach to filter out messages of child feedback panels that have
already been rendered.

Button uploadButton = new AjaxButton("uploadButton")
        {
            @Override
            protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
                //target.addComponent(get("infoFeedback")); // this
causes AJAX upload to hang duing upload of file exceeding max upload
size
                uploadForm.onSubmit();
            }
        };

Thoughts?

Thanks,

Alec

On Sun, Jan 8, 2012 at 12:29 PM, Alec Swan <al...@gmail.com> wrote:
> Hello,
>
> I have an upload form which uploads files using AJAX.
>
> When the file size is less than maxUploadSize the form work correctly
> on the page and modal window.
>
> When file size is greater than maxUploadSize then form works correctly
> and displays an error on the page, but hangs in modal window after
> "INFO: Invoking pre-call handler(s)..." and before "INFO: Response
> parsed. Now invoking steps...".
>
> What could be the reason for AJAX upload request to hang in modal
> window when the file uploaded is too large?
>
> Thanks,
>
> Alec

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: AJAX upload in modal window hangs when file size is too large @L

Posted by jaffa <ja...@gmail.com>.
The DOM is accessed with JavaScript to dynamically display, and to allow the
user to interact with the information presented. JavaScript and the
XMLHttpRequest object provide a method for exchanging data asynchronously
between browser and server to avoid full page reloads. Thanks.
Regards,
http://www.selectgtahomes.ca mississauga homes for sale 


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/AJAX-upload-in-modal-window-hangs-when-file-size-is-too-large-L-tp4276504p4650161.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