Re: Perfomance of IDataProvider

2011-03-02 Thread Juansoft
Thanks a lot for your replies, guys! If any time travels to http://www.flickr.com/photos/juan_an/4495018982/ Toledo (Spain) contact me for invite you a one http://www.flickr.com/photos/formalfallacy/2342052637/ Spanish Omelette ! - Another "wicket" newbie programmer **

Re: Perfomance of IDataProvider

2011-03-01 Thread MZemeck
del(object); } } From: James Carman To: users@wicket.apache.org Date: 03/01/2011 01:11 PM Subject: Re: Perfomance of IDataProvider Sent by:jcar...@carmanconsulting.com It is referenced by the superclass (LoadableDetachableModel in this case). It will "cache" the

Re: Perfomance of IDataProvider

2011-03-01 Thread James Carman
It is referenced by the superclass (LoadableDetachableModel in this case). It will "cache" the list until after the request cycle is complete. Upon subsequent request cycles, the load() method will be called to re-load the list. On Tue, Mar 1, 2011 at 12:51 PM, Juansoft wrote: > Thank for the r

RE: Perfomance of IDataProvider

2011-03-01 Thread Juansoft
Thank for the replies! MZemeck wrote: > > Here's a start, please anyone correct me if I've made any mistakes... > > public class ListLDM extends LoadableDetachableModel { > > private String id; > > public ListLDM(List l, String id) { > //constructor with pri

RE: Perfomance of IDataProvider

2011-03-01 Thread MZemeck
"users@wicket.apache.org" Date: 02/28/2011 05:35 PM Subject: RE: Perfomance of IDataProvider An example with a list would be quite useful. Regards -Original Message- From: mzem...@osc.state.ny.us [mailto:mzem...@osc.state.ny.us] Sent: Monday, February 28, 2011 3:10 PM To: use

Re: Perfomance of IDataProvider

2011-03-01 Thread Juansoft
Thanks a lot for your replies, truly. With the ideas that all have contributed i write a LDM that store a object that is recovered in iterator and also a id for this object (to recover to the database after). I think this will be useful for people who start using Dataview,and are somewhat confuse

RE: Perfomance of IDataProvider

2011-02-28 Thread John Owen
An example with a list would be quite useful. Regards -Original Message- From: mzem...@osc.state.ny.us [mailto:mzem...@osc.state.ny.us] Sent: Monday, February 28, 2011 3:10 PM To: users@wicket.apache.org Subject: Re: Perfomance of IDataProvider If I understand where you are going I

Re: Perfomance of IDataProvider

2011-02-28 Thread James Carman
You want to use this constructor: http://wicket.apache.org/apidocs/1.4/org/apache/wicket/model/LoadableDetachableModel.html#LoadableDetachableModel%28T%29 This way, the LDM will be initialized with the object "pre-loaded" and won't need to go to the database. However, on subsequent requests (suc

Re: Perfomance of IDataProvider

2011-02-28 Thread MZemeck
From: Juansoft To: users@wicket.apache.org Date: 02/28/2011 03:53 PM Subject: Re: Perfomance of IDataProvider First render thanks for your replies. @vov: If i use this: public IModel model(Entity entity) { return new Model(entity); } In this case the memory footprint

Re: Perfomance of IDataProvider

2011-02-28 Thread Juansoft
First render thanks for your replies. @vov: If i use this: public IModel model(Entity entity) { return new Model(entity); } In this case the memory footprint of the session grows because you return Model object that is not a transient object(or this is what I've read in wicket document

Re: Perfomance of IDataProvider

2011-02-28 Thread James Carman
Typically, the LDM that's used to obtain each row in your result set is only called one time, you shouldn't be re-querying individually for each item in the list. LDM's constructor that takes a value will cache that value for the duration of the current request cycle. On Mon, Feb 28, 2011 at 11:

Re: Perfomance of IDataProvider

2011-02-28 Thread vov
You can simply use something like this in your realization of DataProvider: @Override public IModel model(Entity entity) { return new Model(entity); } -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Perfomance-of-IDataProvider-tp3325777p3328194.html Sent fr