LoadableDetachableModels for a ListView ( database with Cayenne)

2012-02-16 Thread atomix
Hi all ,

I'm using Cayenne as my database service...

Now in a query return a ListPerson

which I want to wrap a whole List in to ( so call)
LoadableDetachableListModels to provide for a ListView, I'm also know that a
DataProvider could do the same thing but did any one have write something
like LoadableDetachableListModels to wrap a generic List and provide to a
ListView... 

Please help!!

I've read 
http://wicketinaction.com/2008/09/building-a-smart-entitymodel/
.. so one entity is fine but
but didn't know very clear what can be use for a List 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/LoadableDetachableModels-for-a-ListView-database-with-Cayenne-tp4394185p4394185.html
Sent from the Users forum 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: LoadableDetachableModels for a ListView ( database with Cayenne)

2012-02-16 Thread vineet semwal
see listmodel

btw if you have a big list ,use dataview

On Thu, Feb 16, 2012 at 8:14 PM, atomix say_i_love_you_4e...@yahoo.com wrote:
 Hi all ,

 I'm using Cayenne as my database service...

 Now in a query return a ListPerson

 which I want to wrap a whole List in to ( so call)
 LoadableDetachableListModels to provide for a ListView, I'm also know that a
 DataProvider could do the same thing but did any one have write something
 like LoadableDetachableListModels to wrap a generic List and provide to a
 ListView...

 Please help!!

 I've read
 http://wicketinaction.com/2008/09/building-a-smart-entitymodel/
 .. so one entity is fine but
 but didn't know very clear what can be use for a List

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/LoadableDetachableModels-for-a-ListView-database-with-Cayenne-tp4394185p4394185.html
 Sent from the Users forum 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




-- 
thank you,

regards,
Vineet Semwal

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



Re: LoadableDetachableModels for a ListView ( database with Cayenne)

2012-02-16 Thread vineet semwal
sorry when i meant if you are going to retrieve a lot of data use dataview

On Thu, Feb 16, 2012 at 8:17 PM, vineet semwal
vineetsemwal1...@gmail.com wrote:
 see listmodel

 btw if you have a big list ,use dataview

 On Thu, Feb 16, 2012 at 8:14 PM, atomix say_i_love_you_4e...@yahoo.com 
 wrote:
 Hi all ,

 I'm using Cayenne as my database service...

 Now in a query return a ListPerson

 which I want to wrap a whole List in to ( so call)
 LoadableDetachableListModels to provide for a ListView, I'm also know that a
 DataProvider could do the same thing but did any one have write something
 like LoadableDetachableListModels to wrap a generic List and provide to a
 ListView...

 Please help!!

 I've read
 http://wicketinaction.com/2008/09/building-a-smart-entitymodel/
 .. so one entity is fine but
 but didn't know very clear what can be use for a List

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/LoadableDetachableModels-for-a-ListView-database-with-Cayenne-tp4394185p4394185.html
 Sent from the Users forum 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




 --
 thank you,

 regards,
 Vineet Semwal



-- 
thank you,

regards,
Vineet Semwal

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



Re: LoadableDetachableModels for a ListView ( database with Cayenne)

2012-02-16 Thread François Meillet
Hi Vineet,

   public LoadableDetachableModelYourClass load(final Long xxx) {
   
LoadableDetachableModelListYourClass model = new 
LoadableDetachableModelListYourClass() {

protected YourClass load() {
try {

ListYourClass list = get your liste here( xxx )

return list 

} catch (YourException e) {
   
}
}
};
return model;
}

IModelListYourClass model = load( x );

new ListViewYourClass(id, model) ;



That is ok for a small list.

And if you have to handle large lists, you should use a Dataview with 
DataProvider.

François 





Le 16 févr. 2012 à 15:53, vineet semwal a écrit :

 sorry when i meant if you are going to retrieve a lot of data use dataview
 
 On Thu, Feb 16, 2012 at 8:17 PM, vineet semwal
 vineetsemwal1...@gmail.com wrote:
 see listmodel
 
 btw if you have a big list ,use dataview
 
 On Thu, Feb 16, 2012 at 8:14 PM, atomix say_i_love_you_4e...@yahoo.com 
 wrote:
 Hi all ,
 
 I'm using Cayenne as my database service...
 
 Now in a query return a ListPerson
 
 which I want to wrap a whole List in to ( so call)
 LoadableDetachableListModels to provide for a ListView, I'm also know that a
 DataProvider could do the same thing but did any one have write something
 like LoadableDetachableListModels to wrap a generic List and provide to a
 ListView...
 
 Please help!!
 
 I've read
 http://wicketinaction.com/2008/09/building-a-smart-entitymodel/
 .. so one entity is fine but
 but didn't know very clear what can be use for a List
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/LoadableDetachableModels-for-a-ListView-database-with-Cayenne-tp4394185p4394185.html
 Sent from the Users forum 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
 
 
 
 
 --
 thank you,
 
 regards,
 Vineet Semwal
 
 
 
 -- 
 thank you,
 
 regards,
 Vineet Semwal
 
 -
 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: LoadableDetachableModels for a ListView ( database with Cayenne)

2012-02-16 Thread Francois Meillet
Hi Vineet,

  public LoadableDetachableModelYourClass load(final Long xxx) {

   LoadableDetachableModelListYourClass model = new 
LoadableDetachableModelListYourClass() {

   protected YourClass load() {
   try {

   ListYourClass list = get your liste here( xxx )

   return list 

   } catch (YourException e) {

   }
   }
   };
   return model;
   }

IModelListYourClass model = load( x );

new ListViewYourClass(id, model) ;



That is ok for a small list.

And if you have to handle large lists, you should use a Dataview with 
DataProvider.

François 
Le 16 févr. 2012 à 15:53, vineet semwal a écrit :

 sorry when i meant if you are going to retrieve a lot of data use dataview
 
 On Thu, Feb 16, 2012 at 8:17 PM, vineet semwal
 vineetsemwal1...@gmail.com wrote:
 see listmodel
 
 btw if you have a big list ,use dataview
 
 On Thu, Feb 16, 2012 at 8:14 PM, atomix say_i_love_you_4e...@yahoo.com 
 wrote:
 Hi all ,
 
 I'm using Cayenne as my database service...
 
 Now in a query return a ListPerson
 
 which I want to wrap a whole List in to ( so call)
 LoadableDetachableListModels to provide for a ListView, I'm also know that a
 DataProvider could do the same thing but did any one have write something
 like LoadableDetachableListModels to wrap a generic List and provide to a
 ListView...
 
 Please help!!
 
 I've read
 http://wicketinaction.com/2008/09/building-a-smart-entitymodel/
 .. so one entity is fine but
 but didn't know very clear what can be use for a List
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/LoadableDetachableModels-for-a-ListView-database-with-Cayenne-tp4394185p4394185.html
 Sent from the Users forum 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
 
 
 
 
 --
 thank you,
 
 regards,
 Vineet Semwal
 
 
 
 -- 
 thank you,
 
 regards,
 Vineet Semwal
 
 -
 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