Re: Ajax and Form#setMulitPart(true)

2009-08-23 Thread Igor Vaynberg
the only way to get multipart forms to work in an ajax manner is to do
a regular submit into a hidden iframe rather then using xmlhttprequest
because that does not support multipart encoding.

-igor

2009/8/23 Major Péter :
> Yes, I was using 1.4.1.
> My main problem was at first, that if I set MultiPart to true, then I can't
> have setResponsePage in Form#onSubmit. After solving this with a seperate
> Button and its onSubmit, I was getting always 302 - Moved Temporarily, when
> I tried to send my Form. (In the POST message I could see, that the datas
> from the form are there - see my previous messages for more details)
>
> I'm not quiet sure, what do you mean on "thats the only way to get multipart
> to work" - how?
>
> Thanks,
> Peter
>
> 2009-08-24 02:06 keltezéssel, Igor Vaynberg írta:
>>
>> is he using 1.4.1?
>>
>> the new ajax submit *does* a normal submit - thats the only way to get
>> multipart to work.
>>
>> -igor
>>
>> On Sun, Aug 23, 2009 at 12:22 PM, Johan Compagner
>>  wrote:
>>>
>>> I guess this is because of the new feature that multi part forms work
>>> now in ajax by submitting a iframe
>>> I guess this behavior now doesnt do  a normal submit and you miss some
>>> data?
>>>
>>> On 22/08/2009, Major Péter  wrote:

 After solving the Ajax problem, it looks like, this is still don't want
 to work...
 It looks like, that because of setMultiPart(true), the new input Datas
 aren't storing into models, thats why the form sends invalid content.
 The code that I'm using:
 http://users.hszk.bme.hu/~mp695/quickstart.zip

 //When I remove the FileUploadField and set the MultiPart to false, than
 the form works as intended.

 Please help someone.
 Thanks

 Peter

 2009-08-22 13:04 keltezéssel, Major Péter írta:
>
> Hi all,
>
> I have spent hours with the following issue:
> I tried to create an Ajax represent of ListEditor (
> http://wicketinaction.com/2008/10/building-a-listeditor-form-component/
> ), but the add button didn't work at all, saying:
>
> ERROR: Wicket.Ajax.Call.failure: Error while parsing response: Could
> not
> find root  element
>
> After I opened a Wireshark and watched the traffic, I saw that, the
> request was fine, but instead of ajax-response I getted always:
> HTTP/1.1 302 Moved Temporarily
>
> After googling some time again, I found this:
>
> http://mail-archives.apache.org/mod_mbox/wicket-users/200810.mbox/%3c490466ab.9070...@grons.nl%3e
>
>
> So I tried to remove my setResponsePage from form#onSubmit and the ajax
> worked! When I tried to replace setResponsePage with
> RestartResponseException, then the Ajax stopped working again. So the
> last solution was, that I added to the form a custom button, and in its
> onSubmit did I what I wanted to do in Form#onSubmit.
>
> Summarize:
> If you have enabled the MultiPart for a Form, you can't use
> setResponsePage or RRE in its onSubmit.
>
> Is this normal behavior for Form? If it is, then can't you write a
> little note/JavaDoc about this in Form#setMultiPart() ?
>
> Thanks.
>
> Regards,
> Peter Major
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Re: Ajax and Form#setMulitPart(true)

2009-08-23 Thread Major Péter

Yes, I was using 1.4.1.
My main problem was at first, that if I set MultiPart to true, then I 
can't have setResponsePage in Form#onSubmit. After solving this with a 
seperate Button and its onSubmit, I was getting always 302 - Moved 
Temporarily, when I tried to send my Form. (In the POST message I could 
see, that the datas from the form are there - see my previous messages 
for more details)


I'm not quiet sure, what do you mean on "thats the only way to get 
multipart to work" - how?


Thanks,
Peter

2009-08-24 02:06 keltezéssel, Igor Vaynberg írta:

is he using 1.4.1?

the new ajax submit *does* a normal submit - thats the only way to get
multipart to work.

-igor

On Sun, Aug 23, 2009 at 12:22 PM, Johan Compagner  wrote:

I guess this is because of the new feature that multi part forms work
now in ajax by submitting a iframe
I guess this behavior now doesnt do  a normal submit and you miss some data?

On 22/08/2009, Major Péter  wrote:

After solving the Ajax problem, it looks like, this is still don't want
to work...
It looks like, that because of setMultiPart(true), the new input Datas
aren't storing into models, thats why the form sends invalid content.
The code that I'm using:
http://users.hszk.bme.hu/~mp695/quickstart.zip

//When I remove the FileUploadField and set the MultiPart to false, than
the form works as intended.

Please help someone.
Thanks

Peter

2009-08-22 13:04 keltezéssel, Major Péter írta:

Hi all,

I have spent hours with the following issue:
I tried to create an Ajax represent of ListEditor (
http://wicketinaction.com/2008/10/building-a-listeditor-form-component/
), but the add button didn't work at all, saying:

ERROR: Wicket.Ajax.Call.failure: Error while parsing response: Could not
find root  element

After I opened a Wireshark and watched the traffic, I saw that, the
request was fine, but instead of ajax-response I getted always:
HTTP/1.1 302 Moved Temporarily

After googling some time again, I found this:
http://mail-archives.apache.org/mod_mbox/wicket-users/200810.mbox/%3c490466ab.9070...@grons.nl%3e


So I tried to remove my setResponsePage from form#onSubmit and the ajax
worked! When I tried to replace setResponsePage with
RestartResponseException, then the Ajax stopped working again. So the
last solution was, that I added to the form a custom button, and in its
onSubmit did I what I wanted to do in Form#onSubmit.

Summarize:
If you have enabled the MultiPart for a Form, you can't use
setResponsePage or RRE in its onSubmit.

Is this normal behavior for Form? If it is, then can't you write a
little note/JavaDoc about this in Form#setMultiPart() ?

Thanks.

Regards,
Peter Major


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



Re: Ajax and Form#setMulitPart(true)

2009-08-23 Thread Igor Vaynberg
is he using 1.4.1?

the new ajax submit *does* a normal submit - thats the only way to get
multipart to work.

-igor

On Sun, Aug 23, 2009 at 12:22 PM, Johan Compagner wrote:
> I guess this is because of the new feature that multi part forms work
> now in ajax by submitting a iframe
> I guess this behavior now doesnt do  a normal submit and you miss some data?
>
> On 22/08/2009, Major Péter  wrote:
>> After solving the Ajax problem, it looks like, this is still don't want
>> to work...
>> It looks like, that because of setMultiPart(true), the new input Datas
>> aren't storing into models, thats why the form sends invalid content.
>> The code that I'm using:
>> http://users.hszk.bme.hu/~mp695/quickstart.zip
>>
>> //When I remove the FileUploadField and set the MultiPart to false, than
>> the form works as intended.
>>
>> Please help someone.
>> Thanks
>>
>> Peter
>>
>> 2009-08-22 13:04 keltezéssel, Major Péter írta:
>>> Hi all,
>>>
>>> I have spent hours with the following issue:
>>> I tried to create an Ajax represent of ListEditor (
>>> http://wicketinaction.com/2008/10/building-a-listeditor-form-component/
>>> ), but the add button didn't work at all, saying:
>>>
>>> ERROR: Wicket.Ajax.Call.failure: Error while parsing response: Could not
>>> find root  element
>>>
>>> After I opened a Wireshark and watched the traffic, I saw that, the
>>> request was fine, but instead of ajax-response I getted always:
>>> HTTP/1.1 302 Moved Temporarily
>>>
>>> After googling some time again, I found this:
>>> http://mail-archives.apache.org/mod_mbox/wicket-users/200810.mbox/%3c490466ab.9070...@grons.nl%3e
>>>
>>>
>>> So I tried to remove my setResponsePage from form#onSubmit and the ajax
>>> worked! When I tried to replace setResponsePage with
>>> RestartResponseException, then the Ajax stopped working again. So the
>>> last solution was, that I added to the form a custom button, and in its
>>> onSubmit did I what I wanted to do in Form#onSubmit.
>>>
>>> Summarize:
>>> If you have enabled the MultiPart for a Form, you can't use
>>> setResponsePage or RRE in its onSubmit.
>>>
>>> Is this normal behavior for Form? If it is, then can't you write a
>>> little note/JavaDoc about this in Form#setMultiPart() ?
>>>
>>> Thanks.
>>>
>>> Regards,
>>> Peter Major
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Re: Ajax and Form#setMulitPart(true)

2009-08-23 Thread Johan Compagner
I guess this is because of the new feature that multi part forms work
now in ajax by submitting a iframe
I guess this behavior now doesnt do  a normal submit and you miss some data?

On 22/08/2009, Major Péter  wrote:
> After solving the Ajax problem, it looks like, this is still don't want
> to work...
> It looks like, that because of setMultiPart(true), the new input Datas
> aren't storing into models, thats why the form sends invalid content.
> The code that I'm using:
> http://users.hszk.bme.hu/~mp695/quickstart.zip
>
> //When I remove the FileUploadField and set the MultiPart to false, than
> the form works as intended.
>
> Please help someone.
> Thanks
>
> Peter
>
> 2009-08-22 13:04 keltezéssel, Major Péter írta:
>> Hi all,
>>
>> I have spent hours with the following issue:
>> I tried to create an Ajax represent of ListEditor (
>> http://wicketinaction.com/2008/10/building-a-listeditor-form-component/
>> ), but the add button didn't work at all, saying:
>>
>> ERROR: Wicket.Ajax.Call.failure: Error while parsing response: Could not
>> find root  element
>>
>> After I opened a Wireshark and watched the traffic, I saw that, the
>> request was fine, but instead of ajax-response I getted always:
>> HTTP/1.1 302 Moved Temporarily
>>
>> After googling some time again, I found this:
>> http://mail-archives.apache.org/mod_mbox/wicket-users/200810.mbox/%3c490466ab.9070...@grons.nl%3e
>>
>>
>> So I tried to remove my setResponsePage from form#onSubmit and the ajax
>> worked! When I tried to replace setResponsePage with
>> RestartResponseException, then the Ajax stopped working again. So the
>> last solution was, that I added to the form a custom button, and in its
>> onSubmit did I what I wanted to do in Form#onSubmit.
>>
>> Summarize:
>> If you have enabled the MultiPart for a Form, you can't use
>> setResponsePage or RRE in its onSubmit.
>>
>> Is this normal behavior for Form? If it is, then can't you write a
>> little note/JavaDoc about this in Form#setMultiPart() ?
>>
>> Thanks.
>>
>> Regards,
>> Peter Major
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Re: Ajax and Form#setMulitPart(true)

2009-08-22 Thread Marcin Palka

Peter,

Have a look into the quickstart project that is attached to my post. It's a
simple list editor based on ListView.

http://www.nabble.com/file/p25096254/ListEditor.zip ListEditor.zip . Hope it
helps.

cheers,
Marcin
-- 
View this message in context: 
http://www.nabble.com/Ajax-and-Form-setMulitPart%28true%29-tp25092790p25096254.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Ajax and Form#setMulitPart(true)

2009-08-22 Thread Major Péter
After solving the Ajax problem, it looks like, this is still don't want 
to work...
It looks like, that because of setMultiPart(true), the new input Datas 
aren't storing into models, thats why the form sends invalid content.

The code that I'm using:
http://users.hszk.bme.hu/~mp695/quickstart.zip

//When I remove the FileUploadField and set the MultiPart to false, than 
the form works as intended.


Please help someone.
Thanks

Peter

2009-08-22 13:04 keltezéssel, Major Péter írta:

Hi all,

I have spent hours with the following issue:
I tried to create an Ajax represent of ListEditor (
http://wicketinaction.com/2008/10/building-a-listeditor-form-component/
), but the add button didn't work at all, saying:

ERROR: Wicket.Ajax.Call.failure: Error while parsing response: Could not
find root  element

After I opened a Wireshark and watched the traffic, I saw that, the
request was fine, but instead of ajax-response I getted always:
HTTP/1.1 302 Moved Temporarily

After googling some time again, I found this:
http://mail-archives.apache.org/mod_mbox/wicket-users/200810.mbox/%3c490466ab.9070...@grons.nl%3e


So I tried to remove my setResponsePage from form#onSubmit and the ajax
worked! When I tried to replace setResponsePage with
RestartResponseException, then the Ajax stopped working again. So the
last solution was, that I added to the form a custom button, and in its
onSubmit did I what I wanted to do in Form#onSubmit.

Summarize:
If you have enabled the MultiPart for a Form, you can't use
setResponsePage or RRE in its onSubmit.

Is this normal behavior for Form? If it is, then can't you write a
little note/JavaDoc about this in Form#setMultiPart() ?

Thanks.

Regards,
Peter Major


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