incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Winer" <awi...@gmail.com>
Subject Re: Using Dojo with Trinidad
Date Mon, 09 Oct 2006 21:53:52 GMT
TreeModel doesn't have to do that.  The default implementation
of isContainerEmpty() is:

  public boolean isContainerEmpty()
  {
    if (!isContainer())
      return true;

    enterContainer();
    try
    {
      int kids = getRowCount();
      if (kids < 0)
      {
        setRowIndex(0);
        return !isRowAvailable();
      }
      return (kids == 0);
    }
    finally
    {
      exitContainer();
    }
  }

... which, like you say, gets the children to figure out whether
there's > 0.  If your subclass of TreeModel overrides this to
provide a more efficient implementation, then it won't get
the children until expanded.

BTW, we definitely need some Javadoc on this, because
this is not at all obvious!

-- Adam



On 10/9/06, Rogers Reilly <rogers_reilly@s-rod.com> wrote:
>
> TreeTable definitely does lazy loading.
>
> On the subject, though, I've noticed that (in the build I've been using,
> which is admittedly a bit stale- not the same webapp as my 1.2 project
> :-) ) TreeTable does insist on fetching the children of visible
> nodes--presumably to see whether or not it needs to render an
> "expandable" node.  Problem is, (a) it seems to render the expandable
> icon either way, and (b) there are times when I'd rather it not check
> for this because those are expensive child nodes to build.
>
> To get around this, I've actually added dummy nodes to some of my
> TableTrees:
>
> Node1
> Node2
> ...
> NodeX
>    |-Click to see drilldowns
>          |-Logical SubNode1
>          |-Logical SubNode2
>
> If I don't add the superfluous "Click to see drilldowns" subnode, my
> TreeTable tries to load all of the SubNodes right away- again,
> presumably to figure out if NodeX should be expandable.  I'd love to see
> some kind of "prefetchChildren" attribute so I could disable this
> behavior.
>
> Rogers
>
> Adam Winer wrote:
>
> > 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 <NBhatia@sapient.com> 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
> >> >
> >> >
> >> >
> >>
> >
> >
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message