Advice on using tree and/or "table row group"
I have never explicitly use either a tree or a table row group in a JSF application (although I have in standalone applications created using C++ and a proprietary application framework). I do see, though, that a single row group is used by default.
I suppose the path of least resistance would be to use the table, and figure out how many table row groups are required dynamically at run time and then figure out how to create the required number of row groups. Consider, for example, a situation where you have data for your distributors and dealers, for your business. Consider also you're creating a report providing some kind of summary snapshot of, e.g. sales and profits. Getting the data from a database is not much of a problem (some sort of select, with aggregation functions like sum or avg, with a group by involving distributors and dealers, and possibly an order by clause to ensure a rational order in the output).
And with such hierarchical data, a tree may be a more natural control than a table with a bunch of subtables. Either way, how would one construct either at run time based on the data returned from the DB? And, can a tree node display a table (i.e. I am thinking maybe a tree to manage distributors and any distributors they may sell to, and at the merchant level display a simple table? Or perhaps handle each distributor's dealers in a table row group within a single, albeit more complex table?
I was also thinking about support for drill down exploration of the data. Any thoughts on how easy or difficult that may be with existing JSF controls? If I add such support, I'd want to be able to keep the original table(s) providing drill down support visible. For example, if the dealers' sales are initially displayed by categories of products, and that table supports drill down data exploration, that table ought to remain visible while the data for each product within the product category selected is displayed. I want to make navigation through the data as simpl and natural as possible without an excessive number of pages to be loaded. Any thoughts on how well these controls would support such functionality?
At the heart of the matter is the question of can one dynamically create an arbitrary number of table row groups, in the case of the tables, or an arbitrary number of nodes on a tree control, and if so, how/where would you put the code that computes this from hierarchical data drawn from a database?
Thanks
Ted