1 Reply Latest reply on Mar 26, 2009 3:04 PM by nbelaevski

    rich:treeTable component

      Hi, i've promised on #jsf to release the component I've been working on lately. So here it is:
      http://kubek2k.w.ds14.agh.edu.pl/wiki/doku.php?id=programming:java:richfaces:treetable

      [img]http://kubek2k.w.ds14.agh.edu.pl/wiki/lib/exe/fetch.php?cache=cache&media=programming:java:richfaces:treetable_screenshot.png[/img]

      It's features consist of most of the simple rich:tree features + datascrolling and header rendering. I needs a lot of work and testing, but it works for the simplest cases. I would really appreciate any feedback (good or bad).

      Some of the problems I'm still struggling with are:
      * first of all collapsing and expanding nodes: as the table is rather flat structure, it's not that simple to rerender parts of it as for the simple tree (where there are a lots of recursed divs), and so I've decided to rerender the whole table on each collapse/expand event. It can be probably solved by sending added/removed parts(ids) by ajax requests, and do all the DOM modifications from JS, but my expertise on Ajax4JSF is rather weak, and I don't feel good enough to implement it well (need help).
      * I've used a fake renderer to render the treeNodeFacet (the tree parts in the table), as i wanted to reuse renderer of the rich:tree component (I had no idea how to do it better)
      * some of the code had to be copied and pasted due to the visibility restrictions
      * for the component I've used as much as I could from UITree component, and for the rendering I've inherited (or copied ;) ) code from AbstractTableRenderer
      * the number of rows is counted as a number of top level nodes (so the real row count of rows in the table can vary). There was a suggestion to add a possibility to count all the visible rows, but it has to be rethinked again :).
      * lack of the onCollapse and onExpand js events (TBD)
      * lack of drag-and-drop support

      Thanks for any help/patches or pieces advice

      k2k
      --
      http://kubek2k.w.ds14.agh.edu.pl