Return-Path: Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: (qmail 11832 invoked from network); 7 Sep 2006 20:29:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 7 Sep 2006 20:29:36 -0000 Received: (qmail 42312 invoked by uid 500); 7 Sep 2006 20:29:34 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 41724 invoked by uid 500); 7 Sep 2006 20:29:32 -0000 Mailing-List: contact users-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Discussion" Delivered-To: mailing list users@myfaces.apache.org Received: (qmail 41712 invoked by uid 99); 7 Sep 2006 20:29:32 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Sep 2006 13:29:32 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of andrew.rw.robinson@gmail.com designates 64.233.166.183 as permitted sender) Received: from [64.233.166.183] (HELO py-out-1112.google.com) (64.233.166.183) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Sep 2006 13:29:31 -0700 Received: by py-out-1112.google.com with SMTP id i75so435174pye for ; Thu, 07 Sep 2006 13:29:11 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=dzkL9yqkVLQUViIYKpbcYbv09YCXeXF4A1QN44IDc7SPgWATHXpt67LTdSd6Vg46Ob5tI4YTZ+AZwZPnc8DVc7LmydvOpenNtjn6WfQjaki3/OrqjseLCqK1JmVJNJJUaht741x/VmQ5PIkCOOUWg3GlEasaYEzUExNJ8fuWztc= Received: by 10.35.88.17 with SMTP id q17mr1394987pyl; Thu, 07 Sep 2006 13:29:11 -0700 (PDT) Received: by 10.35.43.20 with HTTP; Thu, 7 Sep 2006 13:29:10 -0700 (PDT) Message-ID: Date: Thu, 7 Sep 2006 14:29:10 -0600 From: "Andrew Robinson" To: "MyFaces Discussion" Subject: Re: tree 2 -- lazy loading. In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I have a WIKI on how to do lazy loading from an external source (web service, database, etc.): http://andrewfacelets.blogspot.com/2006/06/myfaces-tree2-creating-lazy-loading.html On 9/7/06, Jiang, Jane (NIH/NCI) [C] wrote: > I've been using the 2nd method of tree2 lazy loading I learned from the wiki page. I overwrote the getChildren() method to load in the children. It works fine. I am very surprised that the tree slowed down. > > I tried to track down the problem and found that every time I try to expand one node, the getChildren() method gets called for all visible nodes. This behavior defeated half of the purpose of lazy loading since the sibling nodes actually get loaded right away. So we are actually loading one layer at a time, not one node at a time. To make the matter worse, if a node has no child nodes after the first round, the super.getChildren().size() == 0 is always true. So we repeatly goes to the database and try to find more children for those nodes. > > Has any one found a way to work around this problem? Is there a better way to do lazy loading? > > Thanks, > > Jane > > > -----Original Message----- > From: Andrew Robinson [mailto:andrew.rw.robinson@gmail.com] > Sent: Monday, July 17, 2006 6:57 PM > To: MyFaces Discussion > Subject: Re: tree 2 -- lazy loading. > > > Check the archives. You will see my post about a lazy-loading AJAX > tree for jsf-comp > > On 7/17/06, bsimonin@psl.nmsu.edu wrote: > > Quick question: > > > > Is the MyFaces Tree2 lazy loadable? Any examples anywhere? > > > > Thanks in advance, > > > > --Brad. > > >