From adffaces-user-return-1140-apmail-incubator-adffaces-user-archive=incubator.apache.org@incubator.apache.org Tue Oct 10 03:17:46 2006 Return-Path: Delivered-To: apmail-incubator-adffaces-user-archive@locus.apache.org Received: (qmail 38862 invoked from network); 10 Oct 2006 03:17:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Oct 2006 03:17:46 -0000 Received: (qmail 70758 invoked by uid 500); 10 Oct 2006 03:17:46 -0000 Delivered-To: apmail-incubator-adffaces-user-archive@incubator.apache.org Received: (qmail 70737 invoked by uid 500); 10 Oct 2006 03:17:45 -0000 Mailing-List: contact adffaces-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: adffaces-user@incubator.apache.org Delivered-To: mailing list adffaces-user@incubator.apache.org Received: (qmail 70728 invoked by uid 99); 10 Oct 2006 03:17:45 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Oct 2006 20:17:45 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [12.130.39.140] (HELO ims1.sapient.com) (12.130.39.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Oct 2006 20:17:44 -0700 Received: from namail1.sapient.com ([10.222.1.30]) by ims1.sapient.com with Microsoft SMTPSVC(6.0.3790.1830); Mon, 9 Oct 2006 23:17:23 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Re: Using Dojo with Trinidad Date: Mon, 9 Oct 2006 23:17:22 -0400 Message-ID: <19A185AD55D85A469C731E8C81F64C75C6DB17@NAMAIL1.sapient.com> In-Reply-To: <6dac79b90610091951ib4c83c9t32966aee0b74bc62@mail.gmail.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Re: Using Dojo with Trinidad Thread-Index: AcbsFxncH2TIzi2DSP+LeWDeqseNhwAALx5w From: "Naresh Bhatia" To: X-OriginalArrivalTime: 10 Oct 2006 03:17:23.0289 (UTC) FILETIME=[9A8D3C90:01C6EC1A] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Aha. These few sentences clarify the intent of TreeModel more that the entire javadoc for this class! Thanks so much, Adam. I was earlier thinking that TreeModel represents the entire tree and there must be something like "TreeNode" that would represent nodes in the tree. But now that you put it this way, it appears that TreeModel IS the node in the tree and, in a special case, could be the root of the tree. Is my understanding correct? If so, here's my follow up question (and this is the newbie speaking, so please bear with me): It appears that the approach you mention below, will keep the tree's loaded state somewhere in the web container (probably session). Does the TreeModel support the creation of a completely stateless implementation, i.e act as a passthrough to the client? If not, is this the real difference between TreeTable and perhaps a JavaScript/AJAX implementation that will keep the complete state on the client side? Naresh -----Original Message----- From: Adam Winer [mailto:awiner@gmail.com]=20 Sent: Monday, October 09, 2006 10:52 PM To: adffaces-user@incubator.apache.org Subject: Re: Re: Using Dojo with Trinidad The TreeTable only invokes the TreeModel as needed for data. ChildPropertyTreeModel is just one implementation - if you need to load it dynamically, then a custom implementation of TreeModel is needed - either implementing it from scratch or by subclassing ChildPropertyTreeModel. -- Adam On 10/9/06, Clemens Schneider wrote: > I think Adam meant, that TreeTable doesn't load all the data to the > client, but instead fetches the required -fully initialized- data from > the backing TreeModel, when a node is expanded. To lazy load parts of > the TreeModel, you'll have to add (e.g.) proxy objects to the TreeModel > that fetch the data when required or subclass TreeModel to add lazy > loading capabilities... Is it possible to use a ResultSet with > TreeModel, too? Then this would be a possibility, too.. > > -clem > > Naresh Bhatia wrote: > > Well, by "lazy loading" I mean that the entire tree should not be > > fetched from the service layer (or the data access layer) in one shot. > > Instead, only immediate child nodes should be fetched when a node is > > expanded. I think that's what you mean too, but I just wanted to be > > clear about it. > > > > Having said that, I did not readily see how lazy loading would work in > > TreeTable documentation. Here's my JSP code: > > > > > > > rowDisclosureListener=3D"#{treeTableBean.processRowDisclosureEvent}" > > rendered=3D"true" > > rowsByDepth=3D"20" > > summary=3D"Company"> > > .... > > > > > > Here's my TreeTableBean: > > > > public class TreeTableBean { > > private TreeModel treeModel =3D null; > > > > public TreeModel getTreeModel() { > > if (treeModel =3D=3D null) { > > // Get the entire tree from the service layer > > TreeNodeVO root =3D getTreeService().getTree("Company"); > > treeModel =3D new ChildPropertyTreeModel(root, "children"); > > } > > > > return treeModel; > > } > > ... > > } > > > > If getTreeModel() would just return a partial tree, I don't know how > > TreeTable will ask for more nodes. The only interface I see in > > to fetch the tree is the value attribute, which in my > > case is poining to a TreeModel. Given my current understanding, please > > let me know how I could lazy load the tree. > > > > Naresh > > > > -----Original Message----- > > From: Adam Winer [mailto:awiner@gmail.com] > > Sent: Monday, October 09, 2006 12:43 PM > > To: adffaces-user@incubator.apache.org > > Subject: Re: RE: Using Dojo with Trinidad > > > > What do you mean by "does not do lazy loading"? TreeTable > > definitely doesn't load all the data of the tree up front. > > > > -- Adam > > > > > > On 10/7/06, Naresh Bhatia wrote: > > > >> BTW, forgot to answer your other question. Yes, I do plan to create a > >> custom component in Dojo. (Specifically a TreeTable component - I know > >> there is one in Trinidad, but as far as I can tell it does not do lazy > >> loading and couple other requirements I have.) > >> > >> Naresh > >> > >> -----Original Message----- > >> From: Naresh Bhatia [mailto:NBhatia@sapient.com] > >> Sent: Saturday, October 07, 2006 6:28 PM > >> To: adffaces-user@incubator.apache.org > >> Subject: RE: Using Dojo with Trinidad > >> > >> jMaki is on my TODO list to review. A cursory look suggests that it > >> > > will > > > >> work with JSF (https://ajax.dev.java.net/usingFaces.html), but there > >> > > is > > > >> no mention of ADF Faces or Trinidad. My question is specific to > >> Trinidad, because Trinidad seems to take over some of the events like > >> "onLoad" etc. thus potentially encroaching the Dojo turf. I am already > >> having several problems integrating Dojo with with Trinidad raw (see > >> some of my other posts today) - without using any frameworks, so I > >> > > want > > > >> to be extra careful bringing other variables in. One thought that did > >> cross my mind is to NOT use Trinidad on pages where I want to use > >> > > Dojo. > > > >> Anyway I am waiting on the experts in this group to enlighten me :-). > >> > >> Naresh > >> > >> -----Original Message----- > >> From: Clemens Schneider [mailto:clemens.schneider@gmail.com] > >> Sent: Saturday, October 07, 2006 5:02 PM > >> To: adffaces-user@incubator.apache.org > >> Subject: Re: Using Dojo with Trinidad > >> > >> Did you have a look at JMaki? Or are you searching for infos for > >> > > custom > > > >> component development? > >> > >> -clem > >> > >> Naresh Bhatia wrote: > >> > >>> Does anyone have any pointers or samples for using Dojo with > >>> > > Trinidad? > > > >>> > >>> Thanks > >>> > >>> Naresh > >>> > >>> > >>> > >>> > > > > > >