0

I've a situation where I've multiple columnGroups inside my datatable and for each record I render one or more columnGroup depending on some business logic.

Now, since the number of rows in the datatable are different from size of my records list, how do I get total number of pages in the datatable, provided that the number of rows per page is some fixed number let's say 60.

I need that number for my custom datascroller.

Asif Arshad
  • 301
  • 1
  • 10
  • Why is the size different? Are you somehow rendering more or less rows than the size of the collection you're passing to the table? – Makhiel Mar 20 '14 at 11:28
  • Yes, that's what I mentioned above. Let's say there are static headers above each row. So, that header row is also a row and thus increasing the total number of rows in the datatable and making it larger than the collection size. – Asif Arshad Mar 20 '14 at 11:35
  • Can't you create classic headers instead of adding a row? Otherwise you'd have to keep track of the rows you're adding. – Makhiel Mar 20 '14 at 12:15
  • You mean ``. That can only be one in one datatable. I am talking about data grouping headers which are data dependent as well as pagination dependent. – Asif Arshad Mar 21 '14 at 10:49
  • It might help seeing pictures of what you're trying to do. But if you want to have different headers at different points in the table then maybe the data is not worth keeping together in one collection. Did you take a look at [showcase](http://showcase.richfaces.org/richfaces/component-sample.jsf?demo=dataTable&sample=simpleTable&skin=blueSky)? – Makhiel Mar 21 '14 at 11:16

0 Answers0