You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Major Péter <ma...@sch.bme.hu> on 2009/08/22 23:29:18 UTC

Re: Ajax and Form#setMultiPart(true)

Thanks, Marcin,

but I had problems with ListView and element removing ( see: 
http://mail-archives.apache.org/mod_mbox/wicket-users/200908.mbox/%3C4A894C62.8070106@sch.bme.hu%3E 
)
I tried to do this with RepeatingView, now I had tried to solve the 
problem with RefreshingView (based on this: 
http://mail-archives.apache.org/mod_mbox/wicket-users/200802.mbox/%3C15236550.post@talk.nabble.com%3E 
), but both of them aren't working, when the MultiPart flag is setted to 
true.
I'm just out of ideas now...

Regards,
Peter

2009-08-22 19:58 keltezéssel, Marcin Palka írta:
>
> 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

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


Re: Ajax and Form#setMultiPart(true)

Posted by Major Péter <ma...@sch.bme.hu>.
Jira issue:
https://issues.apache.org/jira/browse/WICKET-2432

2009-08-23 21:20 keltezéssel, Johan Compagner írta:
> Pleae try to find out why it broke in 1.4.1 and make a case for this in jira
>
> On 23/08/2009, Major Péter<ma...@sch.bme.hu>  wrote:
>> Marcin,
>>
>> That's it, thanks!!
>> I would never had thought about downgrading to 1.4.0.
>> After changing one character in pom.xml, it works...
>>
>> Thanks again.
>>
>> Regards,
>> Peter
>>
>> 2009-08-23 15:40 keltezéssel, Marcin Palka írta:
>>>
>>> Peter,
>>>
>>> I modifed your quickstart a bit and it seems to work with the wicket
>>> 1.4.0.
>>> Unfortunately I haven't been able for make it work with the 1.4.1. I've
>>> got
>>> no idea why. It may be a bug.
>>>
>>> http://www.nabble.com/file/p25103405/quickstart-modified.zip
>>> quickstart-modified.zip
>>>
>>> cheers,
>>> Marcin

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


Re: Ajax and Form#setMultiPart(true)

Posted by Major Péter <ma...@sch.bme.hu>.
I'm not quiet sure, but I think the problem is in a js file. When 
Firefox caches them, I always get the same behavior for both versions, 
but when I'm pressing ctrl + F5, then 1.4.0 works, 1.4.1 isn't.

2009-08-23 21:20 keltezéssel, Johan Compagner írta:
> Pleae try to find out why it broke in 1.4.1 and make a case for this in jira
>
> On 23/08/2009, Major Péter<ma...@sch.bme.hu>  wrote:
>> Marcin,
>>
>> That's it, thanks!!
>> I would never had thought about downgrading to 1.4.0.
>> After changing one character in pom.xml, it works...
>>
>> Thanks again.
>>
>> Regards,
>> Peter
>>
>> 2009-08-23 15:40 keltezéssel, Marcin Palka írta:
>>>
>>> Peter,
>>>
>>> I modifed your quickstart a bit and it seems to work with the wicket
>>> 1.4.0.
>>> Unfortunately I haven't been able for make it work with the 1.4.1. I've
>>> got
>>> no idea why. It may be a bug.
>>>
>>> http://www.nabble.com/file/p25103405/quickstart-modified.zip
>>> quickstart-modified.zip
>>>
>>> cheers,
>>> Marcin

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


Re: Ajax and Form#setMultiPart(true)

Posted by Johan Compagner <jc...@gmail.com>.
Pleae try to find out why it broke in 1.4.1 and make a case for this in jira

On 23/08/2009, Major Péter <ma...@sch.bme.hu> wrote:
> Marcin,
>
> That's it, thanks!!
> I would never had thought about downgrading to 1.4.0.
> After changing one character in pom.xml, it works...
>
> Thanks again.
>
> Regards,
> Peter
>
> 2009-08-23 15:40 keltezéssel, Marcin Palka írta:
>>
>> Peter,
>>
>> I modifed your quickstart a bit and it seems to work with the wicket
>> 1.4.0.
>> Unfortunately I haven't been able for make it work with the 1.4.1. I've
>> got
>> no idea why. It may be a bug.
>>
>> http://www.nabble.com/file/p25103405/quickstart-modified.zip
>> quickstart-modified.zip
>>
>> cheers,
>> Marcin
>
> ---------------------------------------------------------------------
> 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 and Form#setMultiPart(true)

Posted by Major Péter <ma...@sch.bme.hu>.
Marcin,

That's it, thanks!!
I would never had thought about downgrading to 1.4.0.
After changing one character in pom.xml, it works...

Thanks again.

Regards,
Peter

2009-08-23 15:40 keltezéssel, Marcin Palka írta:
>
> Peter,
>
> I modifed your quickstart a bit and it seems to work with the wicket 1.4.0.
> Unfortunately I haven't been able for make it work with the 1.4.1. I've got
> no idea why. It may be a bug.
>
> http://www.nabble.com/file/p25103405/quickstart-modified.zip
> quickstart-modified.zip
>
> cheers,
> Marcin

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


Re: Ajax and Form#setMultiPart(true)

Posted by Marcin Palka <ma...@gmail.com>.
Peter,

I modifed your quickstart a bit and it seems to work with the wicket 1.4.0.
Unfortunately I haven't been able for make it work with the 1.4.1. I've got
no idea why. It may be a bug.
 
http://www.nabble.com/file/p25103405/quickstart-modified.zip
quickstart-modified.zip 

cheers,
Marcin
-- 
View this message in context: http://www.nabble.com/Ajax-and-Form-setMulitPart%28true%29-tp25092790p25103405.html
Sent from the Wicket - User 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 and Form#setMultiPart(true)

Posted by Major Péter <ma...@sch.bme.hu>.
Marcin,

> I modified my example to allow removing items. I also modified it to use a
> RefreshingView instead of a ListView.

Thanks

> I think you should read a bit about wicket models. Any component update
> should go the following way - first update a model that is bound to a
> component and then repaint the component.

Correct, I tought that too.

> If you do not use ajax the
> component will get updated itself when you press a button of click a link.
> Do not use the setResponsePage unless you want to navigate to another page.

It's gonna be a part of an 'Edit my profile' page, and after filling out 
the form, an another page should show up, so I'm pretty sure I need that 
setResponsePage.

> If you do want to use ajax you refresh your component by adding it to the
> AjaxRequestTarget.

That's true, this part is working nicely, the components are refreshing 
via Ajax. The only problem is, that in the so called submit button, 
which will need to save datas into db/ldap, it doesn't get the input.
After some Wireshark again, I saw the following:
When I pressed Forms 'submit' button, than a following POST message was 
sent to the server (I'm just posting only the header):

POST 
/quickstart-1.0-SNAPSHOT/?wicket:interface=:0:form::IFormSubmitListener:: HTTP/1.1 

Host: localhost:8080

The POST message contains(!) the new datas, but the response is the 
following:

HTTP/1.1 302 Moved Temporarily
X-Powered-By: Servlet/2.5
Server: Sun GlassFish Enterprise Server v2.1
Location: http://localhost:8080/quickstart-1.0-SNAPSHOT/./
Content-Type: text/html; charset=iso-8859-1
Content-Length: 0
Date: Sun, 23 Aug 2009 00:42:59 GMT

I'm just can't see why is this happening.
A quickstart for the problem:
http://users.hszk.bme.hu/~mp695/quickstart.zip

//If you remove fileuploadfield, and set multipart to false, you can see 
the desirable working state

I'm using Wicket 1.4.1

Thanks,

Peter

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


Re: Ajax and Form#setMultiPart(true)

Posted by Marcin Palka <ma...@gmail.com>.
Peter,

I modified my example to allow removing items. I also modified it to use a
RefreshingView instead of a ListView. 
I think you should read a bit about wicket models. Any component update
should go the following way - first update a model that is bound to a
component and then repaint the component. If you do not use ajax the
component will get updated itself when you press a button of click a link.
Do not use the setResponsePage unless you want to navigate to another page.
If you do want to use ajax you refresh your component by adding it to the
AjaxRequestTarget.

In case of a ListView or any other repeater you just add or remove elements
to a list that is provided as a Model for a repeater and then you just make
it repaint (either ajax or non ajax way).

http://www.nabble.com/file/p25099043/ListEditor.zip ListEditor.zip  

cheers
Marcin




-- 
View this message in context: http://www.nabble.com/Ajax-and-Form-setMulitPart%28true%29-tp25092790p25099043.html
Sent from the Wicket - User 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