Re: [Wicket-user] AJAX-updated listview crashes occasionally

2006-03-02 Thread Igor Vaynberg
i think a LoadableDetachableModel would be good. it is attached once per request and the data is held for the duration of the request. you can have a sync block inside load() where you would copy the list from your datasource into a local copy. -Igor On 3/2/06, Eelco Hillenius <[EMAIL PROTECTED]>

Re: [Wicket-user] AJAX-updated listview crashes occasionally

2006-03-02 Thread Eelco Hillenius
One way could be to not update the model until you are attaching again, or - kind of the same principle - update the model from the buffer on detach. You still need some more synchronization though: the attach/ detach models need to be synchronized in that case, and you want to do it it such a way

Re: [Wicket-user] AJAX-updated listview crashes occasionally

2006-03-02 Thread Ramnivas Laddad
Spoke too soon... that doesn't work and I see why. Let me think more to come with a solution. -Ramnivas Ramnivas Laddad wrote: Okay... I solved my problem by making the model thread-aware... class TestModel implements IModel {     private List asyncBuffer = new ArrayList();     private

Re: [Wicket-user] AJAX-updated listview crashes occasionally

2006-03-02 Thread Ramnivas Laddad
Okay... I solved my problem by making the model thread-aware... class TestModel implements IModel {     private List asyncBuffer = new ArrayList();     private List underlying = new ArrayList();         synchronized public Object getObject(Component component) {     underlying.addAll(asyn

Re: [Wicket-user] AJAX-updated listview crashes occasionally

2006-03-02 Thread Ramnivas Laddad
So more like the Swing's single thread policy... In that case, how do I update model when I receive model data asynchronously? Does Wicket has something like EventQueue.invokeLater() or EventQueue.invokeAndWait()? -Ramnivas Igor Vaynberg wrote: doh, i guess i should have looked at the code be

Re: [Wicket-user] AJAX-updated listview crashes occasionally

2006-03-02 Thread Igor Vaynberg
doh, i guess i should have looked at the code before jumping to conclusions. i assumed you were updating the listview in the callback of the ajax behavior. assumption is the mother of ...you have a thread that is running unsynchronized! and updating the model of the component. we synchronize on the

Re: [Wicket-user] AJAX-updated listview crashes occasionally

2006-03-02 Thread Igor Vaynberg
here is what i am getting after a minute or sointeresting-Igor18:09:06.263 WARN!! Exception for /quickstart/app?wicket:interface=:3:wmc:-1:IUnversionedBehaviorListener&wicket:behaviorId=0&random= 0.46824654938259036wicket.WicketRuntimeException: Internal Error: Could not render error page class wic

Re: [Wicket-user] AJAX-updated listview crashes occasionally

2006-03-02 Thread Ramnivas Laddad
Sending again. Sourceforge is rejecting .zip attachment, so please change extension of the attached file to .zip. -Ramnivas === Here it is... (removed lib/*.jar to cut down size). -Ramnivas Igor Vaynberg wrote: any chance you can stick those two files into a quickstart project? -Igor

Re: [Wicket-user] AJAX-updated listview crashes occasionally

2006-03-02 Thread Ramnivas Laddad
Also, after keeping the page up for a while (about 10 minutes), I get the following stack: 15:15:28.546 WARN!! Exception for /quickstart/app?wicket:interface=:21:wmc:-1:IUnversionedBehaviorListener&wicket:behaviorId=0&random=0.05419159267419782 wicket.WicketRuntimeException: Internal Error: Cou

Re: [Wicket-user] AJAX-updated listview crashes occasionally

2006-03-02 Thread Igor Vaynberg
any chance you can stick those two files into a quickstart project?-IgorOn 3/2/06, Ramnivas Laddad < [EMAIL PROTECTED]> wrote:Hi,I now have an AJAXified listview working. However, occasionally (very frequently on a real application and less frequently on a simplifiedapplication :-() it crashes (pro

[Wicket-user] AJAX-updated listview crashes occasionally

2006-03-02 Thread Ramnivas Laddad
Hi, I now have an AJAXified listview working. However, occasionally (very frequently on a real application and less frequently on a simplified application :-() it crashes (program and stack trace at the end of this email). I have an updater thread that adds new entries to the model for the