You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "F. Da Costa Gomez" <dc...@fixed.com> on 2003/09/07 21:57:51 UTC

TreeTable example (v. prelim)

Hi,

Just spend some time on getting a basic yet working TreeTable structure 
put together.
I am re-using stuff found on the web and trying to keep server traffic 
to a minimum.
This means that use will be made of JS on the client side whilst trying 
to keep the html used as straightforward as possible.

Attached are two zips.
1. Contains an inheritance structure I'm also using.I added it so that 
one can more easily get a feeling for the stuff taking place in the 
TreeTable code
2. Contains a TreeTable 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
- 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.

I know this will work but as I want to go back to the Tapestry side 
again I'll leave it for a week or so (maybe I can get this of the case 
of code-blindness as well)

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 ExtendedSortableTable::getRowValue()

I assume it is obvious that this 'stuff' needs to be kicked into being 
by using either the contrib:Table with a special row rendering OR the 
tacos:Tree component also with a row as a node.
Starting work on that now. I'm not sure where to go with that yet 
because tsvetelin also (rightly) mentioned something about incremental 
tree-loading. Hmm.

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

note: since my Tapestry knowledge is not nearly as advanced as it is 
with others I solved the issue according to my abilities. It might be 
frowned upon for other solutions might be better.
This will undoubtfully be the case but who is counting ;-)