Login | Register
My pages Projects Community openCollabNet

Discussions > dev > Sortable columns in TreeTable

sstree
Discussion topic

Hide all messages in topic

All messages in topic

Re: Sortable columns in TreeTable (v1b)

Reply

Author anoncvs
Full name anonymous CVS access
Date 2003-09-10 10:21:53 PDT
Message The sortable treetable looks great, but whenever I try to sort it says
it cannot find the file "bar". And I dont see how any of the sorting
code is called. Can you explain a bit more how it is supposed to work?

I tried in mozilla and konqurer with no luck.

It looks like there is javascript code do to alternating row backgrounds
(banding). That is actually something that I have been wanting. But I
dont see it working in my browser.

When I first did sstree I tried dynamically changing the css classes of
HTML elements. That worked great in mozilla, but not in IE. Also, it
looks like addClassName and removeClassName set el.classname to a
space-separated list of names. Is that legal?

(As you can see, my knowledge of JS and css definately has its limits.)

Thanks,
jason!



On Sun, 2003-09-07 at 13:42, F. Da Costa Gomez wrote:
> Added to this set is also a row-selection script.
> It basically takes care of highlighting the rhe row that is under the
> cursor.
> It also changes the row-color when there is a checked checkbox present.
>
> However, even though it does work in the environment I made it for it is
> acting somewhat peculiar in the sstree setting.
> The added styles (I hope properly defined) can be found in dcgtreestyle.css.
> I've got the funny feeling that something is not ok with my css settings.
>
> Maybe someone can have a peek and improve upon my sorry attempt.
>
> Cheers,
> Fermin DCG
>
> ____________________​____________________​____________________​__________
>
> --------------------​--------------------​--------------------​---------
> To unsubscribe, e-mail: dev-unsubscribe@sstr​ee.tigris.org
> For additional commands, e-mail: dev-help at sstree dot tigris dot org

--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: dev-unsubscribe@sstr​ee.tigris.org
For additional commands, e-mail: dev-help at sstree dot tigris dot org

Re: Sortable columns in TreeTable (v1b)

Reply

Author "F dot Da Costa Gomez" <dcg at fixed dot com>
Full name "F dot Da Costa Gomez" <dcg at fixed dot com>
Date 2003-09-07 13:42:46 PDT
Message Added to this set is also a row-selection script.
It basically takes care of highlighting the rhe row that is under the
cursor.
It also changes the row-color when there is a checked checkbox present.

However, even though it does work in the environment I made it for it is
acting somewhat peculiar in the sstree setting.
The added styles (I hope properly defined) can be found in dcgtreestyle.css.
I've got the funny feeling that something is not ok with my css settings.

Maybe someone can have a peek and improve upon my sorry attempt.

Cheers,
Fermin DCG
Attachments

Re: Sortable columns in TreeTable (v1)

Reply

Author "F dot Da Costa Gomez" <dcg at fixed dot com>
Full name "F dot Da Costa Gomez" <dcg at fixed dot com>
Date 2003-09-07 12:21:09 PDT
Message Jason Robbins wrote:

>The tree table was just an experiment to take the "super simple"
>approach to the next level of complexity and see how well it turned
>out. I think it is OK so far, but the requirement for each row to have
>a specially named id attribute is a bit ugly. However, that should be
>no problem if you are automatically generating the page.
>
>There is no sorting yet. But, I would be glad to work with you to
>implement that. At this point, I don't have a good idea of how to do it
>while still staying true to the "super simple" approach of having the
>data in a reasonable HTML format to begin with.
>
>
Hi,

Sorry it took somewhat longer but I messed up my code and had to redo
some bits and pieces.
Attached are two zips.
1. Contains an inheritance structure I'm also using in the treeSorter.
Added it so that one can more easily get a feeling for the stuff taking
place in the sort code
2. Should be fairly familiar. It's the sstree in sortable format. Only
the size column is sortable in a sensable way but the rest is basically
no issue.

Usage: just unzip the files to a dir and start-up the files in /pages.

Not everything is finished yet. But that is mainly due to :
- The fact that I am no css guru by any means (hint hint ;-) )
- My JS knowledge is not good enough to figure out why the rows do not
get re-colored (even-odd)
- Again to do with JS, sorting of the <input type="xyz"> stuff does not
work fine yet either.

Sorting of the treenode column can take place on text or id or name or
whatever else one sees fit.
This can be determined in the ExtendedSortableTabl​e::getRowValue()

Any help on these outstanding issues would be greatly appriciated ()as
my knowledge is limited).
As one can see the SortableTable is derived from an existing sort class.
Details can be found in the source, as per GPL.

I hope this is usefull for others as well.

Cheers,
Fermin DCG
Attachments

Re: Sortable columns in TreeTable

Reply

Author "F dot Da Costa Gomez" <dcg at fixed dot com>
Full name "F dot Da Costa Gomez" <dcg at fixed dot com>
Date 2003-09-03 07:34:44 PDT
Message Hi,

>The tree table was just an experiment to take the "super simple"
>approach to the next level of complexity and see how well it turned
>out. I think it is OK so far, but the requirement for each row to have
>a specially named id attribute is a bit ugly. However, that should be
>no problem if you are automatically generating the page.
>
>There is no sorting yet. But, I would be glad to work with you to
>implement that. At this point, I don't have a good idea of how to do it
>while still staying true to the "super simple" approach of having the
>data in a reasonable HTML format to begin with.
>
Well, how does this sound.
Rather than going for the all silly functionality version I suggest a
more reasonable approach, tackling issues 1 at a time.

>Perhaps the table could be in the page N times, with N-1 copies all
>hidden. Clicking on a column header would simply hide the table sorted
>one way and display it sorted another way. That is a lot of data to
>send over the wire, so it would not be fast.
>
Unless a refresh takes place on the server this is not required at all.
I would rather stay on the client 4 as long as I can so that would imply JS.

>Another way to do it would be to rely on client-side XLST to do sorting
>and transformation to HTML at the same time. But, that only works with
>the most recent browsers.
>
That's why JS would probably be a better bet, combined with the DOM.

>There is also an issue of how sorting meshes with the tree structure
>itself: do you want to sort multiple rows within each tree leaf? more
>likely you want to sort on some othe column and abandon the tree
>structure.
>
Yep, leaf the tree structure as it is and just sort the lowest level leafs.
The thing I had in mind (and am testing with) is the following:
- surround the rows containing a set of 'same level' *leafs* with a
level indication <tbody id="x-y-z">
- If a node (collapsed) has got leafs they are just that leafs. For now
I would not consider mixing the branches and the leafs
- all the rows are structured the same
- If a sort is done on a column the sort routine goes through all all
the tbodies and sorts them seperately

What the opinion on this as a first effort?

TIA,
Fermin DCG





--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: dev-unsubscribe@sstr​ee.tigris.org
For additional commands, e-mail: dev-help at sstree dot tigris dot org

Re: Sortable columns in TreeTable

Reply

Author "F dot Da Costa Gomez" <dcg at fixed dot com>
Full name "F dot Da Costa Gomez" <dcg at fixed dot com>
Date 2003-09-01 10:55:09 PDT
Message Hi Jason,

Thx for the swift reply.
Missed the subscribe thing, been rectified in the meantime though.

>>Using Tapestry to generate HTML I was looking for something exactly like
>>the TreeTable.
>>
>>
>The tree table was just an experiment to take the "super simple"
>approach to the next level of complexity and see how well it turned
>out. I think it is OK so far, but the requirement for each row to have
>a specially named id attribute is a bit ugly. However, that should be
>no problem if you are automatically generating the page.
>
Totally correct. Simplicity before anything else.

>There is no sorting yet. But, I would be glad to work with you to
>implement that. At this point, I don't have a good idea of how to do it
>while still staying true to the "super simple" approach of having the
>data in a reasonable HTML format to begin with.
>
That makes two of us.

>Perhaps the table could be in the page N times, with N-1 copies all
>hidden. Clicking on a column header would simply hide the table sorted
>one way and display it sorted another way. That is a lot of data to
>send over the wire, so it would not be fast.
>
>Another way to do it would be to rely on client-side XLST to do sorting
>and transformation to HTML at the same time. But, that only works with
>the most recent browsers.
>
>There is also an issue of how sorting meshes with the tree structure
>itself: do you want to sort multiple rows within each tree leaf? more
>likely you want to sort on some othe column and abandon the tree
>structure.
>
>
At this moment my thoughts are going along the following lines:
Assuming all columns are equal (as in branches are the same as their
leafs from a column content view) clicking on the column would basically
leave the tree intact in its basic structure (unless clicked on the
'level' column, which would sort on the level 1 text only).
Thus any other col click would respect the location of the level-1 col,
get the levels which are *opened* and *only* sort the leaf-rows
underneath the respective branches withing the main level-1.
What I'm basically saying is that within the level-1 branch *all* the
branches remain in the same place! *Only* the leafs can be changed
(within the context of the direct mother branch).
One never abandons the tree structure as such.
Am I making sense here??

TIA,
Fermin DCG




--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: dev-unsubscribe@sstr​ee.tigris.org
For additional commands, e-mail: dev-help at sstree dot tigris dot org

Re: Sortable columns in TreeTable

Reply

Author anoncvs
Full name anonymous CVS access
Date 2003-09-01 10:19:38 PDT
Message Hi Fermin,

Please note that replies normally go directly back to the mailing list,
not to the original poster. So, if you want to continue this
conversation you should join the mailing list by sending a message to
dev-subscribe@sstree​.tigris.org. The subject line and body do not
matter. Then you will need to reply to a "CONFIRM" email. The mailing
list currently has very low traffic. And it is discussion moderatated,
meaning that members can post freely, but outsiders (like spammers) must
go through moderation, so you are very unlikely to get any spam via this
list.


On Mon, 2003-09-01 at 09:11, F. Da Costa Gomez wrote:
> Over the weekend I fiddled a bit with the TreeTable and I liked it (the
> TreeTable not the fiddling perse).

That's great. I'm glad that you like it.

> Using Tapestry to generate HTML I was looking for something exactly like
> the TreeTable.

I think a lot of people have been looking for something like this. I
created the simple trees because I needed it for ReadySET
(http://readyset.tigris.org). Now I think Scarab is experimenting with
a variant of it, and I think it would be great if open source projects
gained from it as well. I am sure other people using Tapestry would be
interested in seeing what you come up with. I'd be happy to host a list
of examples of uses of sstree in the sstree project.


> Looking at the example page it also mentions *sorting*.
> Is there a js somewhere that I missed or is something supposed to be
> hooked up?

The tree table was just an experiment to take the "super simple"
approach to the next level of complexity and see how well it turned
out. I think it is OK so far, but the requirement for each row to have
a specially named id attribute is a bit ugly. However, that should be
no problem if you are automatically generating the page.

There is no sorting yet. But, I would be glad to work with you to
implement that. At this point, I don't have a good idea of how to do it
while still staying true to the "super simple" approach of having the
data in a reasonable HTML format to begin with.

Perhaps the table could be in the page N times, with N-1 copies all
hidden. Clicking on a column header would simply hide the table sorted
one way and display it sorted another way. That is a lot of data to
send over the wire, so it would not be fast.

Another way to do it would be to rely on client-side XLST to do sorting
and transformation to HTML at the same time. But, that only works with
the most recent browsers.

There is also an issue of how sorting meshes with the tree structure
itself: do you want to sort multiple rows within each tree leaf? more
likely you want to sort on some othe column and abandon the tree
structure.


Thanks,
jason!

--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: dev-unsubscribe@sstr​ee.tigris.org
For additional commands, e-mail: dev-help at sstree dot tigris dot org

Sortable columns in TreeTable

Reply

Author "F dot Da Costa Gomez" <dcg at fixed dot com>
Full name "F dot Da Costa Gomez" <dcg at fixed dot com>
Date 2003-09-01 09:11:55 PDT
Message Hi,

Over the weekend I fiddled a bit with the TreeTable and I liked it (the
TreeTable not the fiddling perse).

Using Tapestry to generate HTML I was looking for something exactly like
the TreeTable.
Looking at the example page it also mentions *sorting*.

Is there a js somewhere that I missed or is something supposed to be
hooked up?

TIA,
Fermin DCG

ps. Sorry, cross posted this as well on the style prj



--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: dev-unsubscribe@sstr​ee.tigris.org
For additional commands, e-mail: dev-help at sstree dot tigris dot org
Messages per page: