Re: Cannot read Ajax response for multipart form submit
Hi, I found the solution. Yes, I have a failure callback listener, and it is actually invoked. The question was why this happens, i.e. why the Ajax response is not received by the client, as if it lost connection with the server. The answer is related to Tomcat: in fact the maximum size for aborted uploads that Tomcat is configured to "swallow" is 2MB. Nonetheless, it is possible to configure the Connector by setting the attribute maxSwallowSize. Thanks to you. Best -- Marco On 30 May 2017 at 20:45, Martin Grigorov <mgrigo...@apache.org> wrote: > Hi, > > Do you have a failure callback listener for this Ajax call ? > See IAjaxCallListener#onFailure(). > If this doesn't help then please create a quickstart application and attach > it to a ticket in JIRA! > Thanks! > > Martin Grigorov > Wicket Training and Consulting > https://twitter.com/mtgrigorov > > On Tue, May 30, 2017 at 5:39 PM, marco di gasbarro <m.digasba...@gmail.com > > > wrote: > > > Hi there, > > I am struggling with this issue using Tomcat 8.5.14 and Wicket 6.24 > > > > When FileUploadBase$FileItemIteratorImpl constructor throws > > SizeLimitExceededException, the ajax response is not read by the browser > > client, which keeps waiting (Firefox) or aborts (IE) the connection, with > > the following ajax error: > > "Cannot read Ajax response for multipart form submit: TypeError: > Permission > > denied > > Wicket.Ajax.Call.failure: Error while parsing response: No XML response > in > > the IFrame document" > > > > Thank you > > -- > > Marco > > >
Cannot read Ajax response for multipart form submit
Hi there, I am struggling with this issue using Tomcat 8.5.14 and Wicket 6.24 When FileUploadBase$FileItemIteratorImpl constructor throws SizeLimitExceededException, the ajax response is not read by the browser client, which keeps waiting (Firefox) or aborts (IE) the connection, with the following ajax error: "Cannot read Ajax response for multipart form submit: TypeError: Permission denied Wicket.Ajax.Call.failure: Error while parsing response: No XML response in the IFrame document" Thank you -- Marco
when a Form validation fails, components don't refresh correctly
Hey All, I'm dealing with a user interaction problem after a failed Form validation. In fact I have a Form with two components: a DropDownChoice and a TextField. The DropDownChoice has an AjaxFormComponentUpdatingBehavior attached, which modifies the TextField's model object and then adds the TextField itself to the AjaxRequestTarget. When the Form validation fails, the DropDown's Behavior changes the TextField's underlying model object correctly, adds the TextField to the Target, but the TextField renders with the old converted input, which doesn't reflect the changes. If on the one hand it looks like a Wicket's feature to leave the Form components showing the input which couldn't be validated, on the other hand a flexible user interaction should let the component to be notified about the changes occurred on its model object. By now I work around it calling inputChanged() on the TextField before adding it to the Target. Is there any best practice which covers this use case? Here is a snippet: new AjaxFormComponentUpdatingBehavior("change"){ @Override protected void onUpdate(AjaxRequestTarget target) { //update the TextField model object getMyFormModelObject().setMyTextFieldModelObject(newValue); //temporary workaround myTextField.inputChanged(); //add the textfield to the Target target.add(myTextField); } } Thanks in advance for your help! -- Marco