On Tue, Jan 6, 2009 at 7:44 AM, winfried detmar <wm.det...@online.de> wrote:

> Hi,
>
> I'm new to qooxdoo


Welcome!

>
> Now I want to build a tree which loads a folder's children (only one
> level) on click on the open symbol of a folder dynamically (via RPC-PHP).
> How could I implement this? Which TreeFolder event could I listen to?


There are two tree widgets that you can choose from: qx.ui.tree.Tree and
qx.ui.treevirtual.TreeVirtual.  Tree is good for reasonably small trees.  It
renders the entire known tree at one time, using sub-widgets internally.
This gives good flexibility in use of the tree at the expense of rendering
the entire tree.  TreeVirtual, on the other hand, renders only the portion
of the tree that's visible on the screen at a time.  This means that it can
handle gigantic trees (with the tree data being maintained locally or at a
backend someplace), but is a bit more complicated if you want to do special
rendering since you have to deal with a "cell renderer" which generates html
rather than simply dealing with lower-level qooxdoo widgets.  (For most
usage, though, you needn't bother with that, and it's easy to use.)

If you choose to use Tree then listen for the "changeOpenMode" event on your
qx.ui.tree.Tree object.  See
http://demo.qooxdoo.org/current/apiviewer/#qx.ui.tree.Tree

The TreeVirtual widget separates that into three events:
"treeOpenWhileEmpty", "treeOpen WithContent", and "treeClose".  See
http://demo.qooxdoo.org/current/apiviewer/#qx.ui.treevirtual.TreeVirtual

Finally, since you mentioned the PHP backend, have a look at the example
file qooxdoo-contrib/RpcPhp/trunk/services/qooxdoo/fs.php which shows how
one might implement the backend side for a request that could be issued upon
receipt of the event "treeOpenWhileEmpty".

Cheers,

Derrell
------------------------------------------------------------------------------
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to