Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Nested table without using datatable

 
Amy Mahapatra
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Need to create a nested table without using datatable. Please help me to achieve this asap. I am using jsp and jsf but using datatable is not allowed. :banghead:
 
Tim Holloway
Saloon Keeper
Posts: 18303
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Amy!

JSP is not part of JSF since JSF version 2.

WHY are you not allowed to use dataTable? If this is some idiot manager's idea, its' THEY who need some head-banging!

Nested datatables are painful, though. Even in the latest versions of JSF, getting the current row of the inner table requires some awkward code.
 
Amy Mahapatra
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is some requirements for not using datatable.. If anyone can tell me how to pass values from backing bean for each column.. I guess i need little example. I am somewhat successful in building a raw table and one nested table. But unable to pass values :(
 
Tim Holloway
Saloon Keeper
Posts: 18303
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"some requirements" is often a euphemism for "manager is an idiot". My recommendation on how to solve such problems involves updating one's CV if said manager(s) cannot be persuaded to discard such arbitrary limitations. Deliberately avoiding industry standard solutions because some "expert" arbitrarily forbade them just means that whatever workaround is done is typically going to be time-consuming, expensive, often fragile, and more difficult/expensive to maintain.

JSF expects to do all the fetching and updating between Model and View itself. JSF is a fairly pure implementation of the MVC paradigm, but in JSF, you don't write Controllers to do the transfer of data between Model and View, they are pre-written parts of the JSF FacesServlet and tag implementations. And the h:dataTable tag implementation in particular for such cases as the one you describe.

Unfortunately, the current implementation of dataTable doesn't take nesting into account, so some helper code has to be written that makes up for that lack.

 
K. Tsang
Bartender
Posts: 3521
16
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with Tim here about the manager's thinking. It would be a cake using datatable with sub-datatable or row expansion.

If indeed datatable is not allowed, does that mean doing a table in html/jstl (the old fashioned way)?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic