svn commit: samba r20924 - in branches/SAMBA_4_0/webapps/swat/source/class/swat/module/ldbbrowse: .

simo idra at
Sun Jan 21 01:22:43 GMT 2007

On Sat, 2007-01-20 at 19:18 -0500, derrell at wrote:
> simo <idra at> writes:
> > The Tree widget has a bad behavior, when you click on the plus/minus
> > sign of a never retrieved object the object itself is loaded in the
> > table but it does not check if there are children on the first time.
> > So to actually see if an object has children you have to click on it 3
> > times. This is actually very annoying.
> >
> > How do I make it load them on the first click on a plus sign?
> I believe that is a bug in the tree implementation.  I have it on my to-do
> list to fix that.  (I do much of the Tree code maintenance.)  You needn't
> worry about it; it's not specific to this application.  When I get it fixed,
> I'll incorporate the fix into Samba.  (Ping me in a couple of weeks if it's
> not yet done.)

But the API Documentation do not show this bug, what's different there?

> > Is it possible to actually click a plus/minus icon without also
> > selecting the clicked entry? I'd like to be able to open a tree
> > component without necessarily loading the object data.
> > The object has obviously knowledge of what you have clicked (the body or
> > the plus/minus icon) but I couldn't find much about how the object is
> > actually selected.
> That's related to the Selection Manager.  I don't recall (if I ever knew) how
> one might do that, but as I'm looking through the tree code to fix the above
> bug, I'll see if I can figure out how to do that.


> > I think (not tested) that ones an object is loaded it is never
> > refreshed, is there an easy way to do it? is it possible to add an icon
> > to the label so that when you click that icon the object is actually
> > refreshed ? What if I delete an object in the ldb db? can I remove just
> > the objet from the tree an count on the fact that all children will
> > automatically be removed and resources be freed?
> IIRC, I trap the TreeOpenWhileEmpty event, and load the data then.  You could
> certainly trap also the TreeOpenWithContent event and see if anything has
> changed.

Ok, I wasn't sure if that was fired at every open, good to know.

> You should also be able to add a handler for an icon to refresh the data.

Do you have any example on how to do this?
I find the docs on very limited, without any example on how
to use the various widgets effectively. For example it took me a lot of
time to understand (and only partially) how to make LdifViewer
auto-resize and stay within the boundaries of the page (and I am still
not much satisfied).

> I have recently been working on a Virtual Tree widget, in qooxdoo svn.
> Rendering is the slowest thing a browser has to do, and rendering large trees
> can be painfully slow.  the Virtual Tree renders only the data that's visible,
> and repaints the pane with new data when you scroll.  It's WAY faster (no
> noticeable delay even with 3000 leaf nodes in a branch!).  I'm also trying to
> fix some of the other known issues the Tree and TreeFullControl widgets have
> as I work on this.  It is my expectation that eventually, TreeVirtual will
> replace both of the other two.  Switching to it will require some code
> changes, but for what we're doing in LdbBrowse, shouldn't be too difficult.
> I'd guess it's still a number of weeks off, though, before I consider
> TreeVirtual ready to be used by the masses.

I'm ok with the Tree as it is mostly, so I guess you'll be able to
change that easily once TreeVirtual is ready.

> BTW, you'll learn a lot by monitoring the qooxdoo mailing list.  I highly
> recommend that you join it.

I'll do.


Simo Sorce
Samba Team GPL Compliance Officer
email: idra at

More information about the samba-technical mailing list