Hello,
I would like to request that some agreement is made as to how user data
is stored in a TreeVirtual, so that developers can write interoperating
extensions for the TreeVirtual class.
I hereby suggest that, equivalent to the widget.setUserData() syntax,
custon data be stored in the treedatamodel in the "userData" property of
the node object. This way, we can separate internal node data from
custom data, and avoid property name conflicts.
Thus, the node object would look like this:
{
// USER-PROVIDED ATTRIBUTES
// ------------------------
type : qx.ui.treevirtual.SimpleTreeDataModel.Type.LEAF,
parentNodeId : 23, // index in _nodeArr of the parent node
label : "My Documents",
bSelected : true, // true if node is selected; false otherwise
bOpened : true, // true (-), false (+)
bHideOpenClose : false, // whether to hide the open/close button
icon : "images/folder.gif",
iconSelected : "images/folder_selected.gif",
children : [ ], // each value is an index into _nodeArr
cellStyle : "background-color:cyan"
labelStyle : "background-color:red;color:white"
// USER-PROVIDED CUSTOM DATA
// --------------------------
userData : { foo : "bar", ... },
// USER-PROVIDED COLUMN DATA // this is not documented in the API viewer
// -------------------------
columnData : [ null, // first column is tree column in most cases
"text of first column",
"text of second column" ],
// INTERNALLY-CALCULATED ATTRIBUTES
// --------------------------------
// The following properties need not (and should not) be set by the
// caller, but are automatically calculated. Some are used internally,
// while others may be of use to event listeners.
nodeId : 42, // The index in _nodeArr, useful to event listeners
level : 2, // The indentation level of this tree node
bFirstChild : true,
lastChild : [ false ], // Array where the index is the column of
// indentation, and the value is a boolean.
// These are used to locate the
// appropriate "tree line" icon.
}
Does this make sense to everybody?
Christian
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel