On 8/2/07, MootCycle <[EMAIL PROTECTED]> wrote:
>
>      I have a table with a large amount of data pushed to it from a server.
> It would be nice to be able to filter the data on the client side so we do
> not have to re-request all the data from the server.
>
>      I've been looking through the TreeVirtual files looking for how that
> object hides certain table rows from being rendered, but I must be missing
> the step that actually flips the row from visible to invisible (and I don't
> see a property on the row data itself.) I've gotten as far as tracing into
> the setData() function (SimpleTreeDataModel.js) and then into the render
> function, but I don't see anything in that function checking to see if the
> row should be hidden or rendered. Maybe I'm looking at this the wrong way,
> but it would be great if someone could point me in the right direction in
> TreeVirtual so I could try and implement the same thing in a standard table.

Dan, you're on the right track!

TreeVirtual maintains two sets of data.  _nodeArr contains *all* rows,
whether visible or not.  _rowArr contains only those rows which are
visible.  _rowArr is rebuilt whenever there are any changes to
visibility, or when rows are added or deleted.

Look at the method setData() in SimpleTreeDataModel.js, and in
particular, the function within that called inorder(), which rebuilds
the _rowArr array.  This may seem a bit inherently slow, but it turns
out that with 5000+ nodes, the time to rebuild _rowArr is still fairly
close to unnoticeable.

Cheers,

Derrell

-------------------------------------------------------------------------
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

Reply via email to