Removing Natural Order Sorting

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Removing Natural Order Sorting

Alex Milowski
I've been trying to remove the "natural" order from my trees that
are backed by RDF without any success.  What I tried was removing
the sort attribute on the treecol and then adding a onclick
that called the following javascript:

    toggleSort: function(id,resource) {
       var treecol = document.getElementById(id);
       var direction = treecol.getAttribute("sortDirection");
       var current = treecol.parentNode.firstChild;
       while (current) {
          if (current.nodeType==1 && current.localName=="treecol") {
          current = current.nextSibling;
       if (direction=="ascending") {
          direction = "descending";
       } else {
          direction = "ascending";
       var sortService =
       sortSerivce =
       sortService.sort(treecol, resource, direction);

The 'id' parameter is the id of the treecol element I want to
sort and the 'resource' parameter is the RDF property I want
to sort upon.

Not only does it not work correctly, but that last line causes
the browser to crash:


If I put an "alert" call right before that line, the browser does
not crash.

--Alex Milowski
dev-tech-rdf mailing list
[hidden email]