aspose file tools*
The moose likes JSF and the fly likes grouping in datatable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "grouping in datatable" Watch "grouping in datatable" New topic
Author

grouping in datatable

Raj Purohit
Greenhorn

Joined: Sep 26, 2007
Posts: 10
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

Joined: Feb 04, 2006
Posts: 96
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

Joined: Sep 26, 2007
Posts: 10
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

Joined: Feb 05, 2001
Posts: 17260
    
    6

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


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: grouping in datatable