Return-Path: X-Original-To: apmail-wicket-users-archive@minotaur.apache.org Delivered-To: apmail-wicket-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4D4A49219 for ; Thu, 16 Feb 2012 15:10:18 +0000 (UTC) Received: (qmail 74721 invoked by uid 500); 16 Feb 2012 15:10:17 -0000 Delivered-To: apmail-wicket-users-archive@wicket.apache.org Received: (qmail 74623 invoked by uid 500); 16 Feb 2012 15:10:17 -0000 Mailing-List: contact users-help@wicket.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@wicket.apache.org Delivered-To: mailing list users@wicket.apache.org Received: (qmail 74614 invoked by uid 99); 16 Feb 2012 15:10:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Feb 2012 15:10:17 +0000 X-ASF-Spam-Status: No, hits=2.8 required=5.0 tests=HK_RANDOM_ENVFROM,HK_RANDOM_FROM,RCVD_IN_DNSWL_NONE,SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [212.27.42.3] (HELO smtp3-g21.free.fr) (212.27.42.3) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Feb 2012 15:10:10 +0000 Received: from [192.168.0.10] (unknown [88.166.6.100]) by smtp3-g21.free.fr (Postfix) with ESMTP id A37A7A62E0 for ; Thu, 16 Feb 2012 16:09:41 +0100 (CET) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Apple Message framework v1257) Subject: Re: LoadableDetachableModels for a ListView ( database with Cayenne) From: =?iso-8859-1?Q?Fran=E7ois_Meillet?= In-Reply-To: Date: Thu, 16 Feb 2012 16:09:40 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <7644A372-2D09-4FF0-BF96-92A15A636688@meillet.com> References: <1329403446382-4394185.post@n4.nabble.com> To: users@wicket.apache.org X-Mailer: Apple Mail (2.1257) Hi Vineet, public LoadableDetachableModel load(final Long xxx) { =20 LoadableDetachableModel> model =3D new = LoadableDetachableModel>() { protected YourClass load() { try { =20 List list =3D get your liste here( xxx ) =20 return list=20 =20 } catch (YourException e) { =20 } } }; return model; } IModel> model =3D load( x ); new ListView(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=E7ois=20 Le 16 f=E9vr. 2012 =E0 15:53, vineet semwal a =E9crit : > sorry when i meant if you are going to retrieve a lot of data use = dataview >=20 > On Thu, Feb 16, 2012 at 8:17 PM, vineet semwal > wrote: >> see listmodel >>=20 >> btw if you have a big list ,use dataview >>=20 >> On Thu, Feb 16, 2012 at 8:14 PM, atomix = wrote: >>> Hi all , >>>=20 >>> I'm using Cayenne as my database service... >>>=20 >>> Now in a query return a List >>>=20 >>> 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... >>>=20 >>> Please help!! >>>=20 >>> 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 >>>=20 >>> -- >>> 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. >>>=20 >>> = --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org >>> For additional commands, e-mail: users-help@wicket.apache.org >>>=20 >>=20 >>=20 >>=20 >> -- >> thank you, >>=20 >> regards, >> Vineet Semwal >=20 >=20 >=20 > --=20 > thank you, >=20 > regards, > Vineet Semwal >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org > For additional commands, e-mail: users-help@wicket.apache.org >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org For additional commands, e-mail: users-help@wicket.apache.org