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

grouping in datatable

 
Raj Purohit
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
How to group the rows in datatable?
Say for eg. I want to group the employee records acc to the location.
Thanks.
 
krishnamoorthy kitcha
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

check this query

select empno,location from employee
group by empno,location

if the same employee have the different location

use like this

select empno from employee
group by empno
having count(location)>1
 
Raj Purohit
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
More specifically, I am using myfaces and <x:datatable> tag. I want to group the records in <x:datatable> in JSF.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, not sure if you want to go to some other open source JSF Components, but the datatable in RichFaces allows subtables, which really help with grouping.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic