On Wed, Jun 29, 2011 at 17:30, Ron Whittaker <[email protected]>wrote:
> Hello,
> I have a few questions related to remote tables and to the TreeVirtual
> class.
>
> I have a huge tree sitting on a server, and I would like to show this tree
> in a client such that only parts of it are opened as requested by the user.
> I guess TreeVirtual is the right choice for this?
>
> After reading
> http://manual.qooxdoo.org/1.4.x/pages/widget/table_remote_model.html I
> have been able to show a huge remote table in the client.
> But... are the members funtions _loadRowCount() ..._onRowDataLoaded()
> documented anywhere except for this example page?
>
They are documented in the API docs for qx.ui.table.model.remote, but they
may not be documented as well as they should be.
> And is it possible to transfer only a range of columns(firstCol..lastCol)
> such as only rows from firstRow..lastRow are loaded in _loadRowData()?
>
You can adjust the maximum number of blocks that are cached (see the
maxCachedBlockCount property), but not to the level of specifying specific
rows. (You could, of course, extend qx.ui.table.model.remote and override
various methods in your subclass. I'd be curious why you wanted such
fine-grained control, however. It should, I think, be necessary.)
>
> Now for the more difficult problems:
> Can I find a similar tutorial style explanation for TreeVirtual as
> http://manual.qooxdoo.org/1.4.x/pages/widget/table_remote_model.html for
> qx.ui.table.model.Remote?
> I have not been able to set up an example that loads a tree structure from
> a remote server. Which data model should I choose for the tree? I tried to
> use qx.ui.treevirtual.SimpleTreeDataModel, but this seems to request the
> whole tree from the server at once. I am looking for an abstract equivalent
> to qx.ui.table.model.Remote?
>
TreeVirtual is based on Table, as you've noted. The way it's implemented is
with a very special table model (referred to as a data model in TreeVirtual)
and a special cell renderer. Because of all of the tree-specific
requirements of the data model, you can not simply switch it to using
qx.ui.table.model.Remote, which simply doesn't know about all of those
tree-specific requirements.
Trees work differently than tables, however. Except in extreme cases, the
number of immediate descendants of any parent is not so large that it would
consume vast amounts of memory in the data model. What the TreeVirtual data
model provides for you are events that you may listen for, allowing you to
retrieve the children of a node only when it is actually opened.
qx.ui.treevirtual.TreeVirtual offers the events "treeOpenWithContent",
"treeOpenWhileEmpty", and "treeClose". You can use "treeOpenWhileEmpty" to
retrieve the children of the node being opened from your server. If you have
a huge amount of data for your tree, you might opt, when you receive
"treeClose" events, to remove those children from your model. (If you do so,
then the next time the user opens that node, it will be empty, so you would
again retrieve the child from the server with no loss of functionality, but
at the speed penalty of a request to the server.)
> Finally, why do both qx.ui.tree.VirtualTree and
> qx.ui.treevirtual.TreeVirtual exist? Do they serve similar purposes?
>
qx.ui.treevirtual.TreeVirtual is the original virtual tree implementation,
based on qx.ui.table.Table which was a fairly addition to qooxdoo and has
provided wonderful capabilities, but has shown growing pains. With 20-20
hindsight, the new qx.ui.virtual.* widgets have been created. They're not
done yet, and I believe some capabilities of qx.ui.treevirtual.TreeVirtual
do not yet exist in qx.ui.virtual.*, but I don't know the latter well enough
to tell you which those are.
Cheers,
Derrell
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel