tags:

views:

278

answers:

1

Hi, As a requirement i have two datatables for the same List. Can I use one datascroller to control both the tables. Please help me on solving this.

A: 

This could be solved easily in HTML but not in JSF; In JSF the two lists are completely separate things. My guess is that you must look at the source code of the JSF list implementation and create your own UI component from that. Create one which creates the list without the scrollbar and then wrap those in a kind of "scrolled area" (i.e. a DIV that has the correct overflow style).

Aaron Digulla
Thanks Aaron, I have done it in a similar way. My requirement was to freeze the first two columns in the datatable and the rest of the columns should be scrollable. In my first approach I tried using two datatables side by side, one with the freezed columns and the other with the remaining columns by keeping them in a div tag. But this was creating so many other problems like maintaing the height of each row and also the datascroller. So now i am using only one datatable and using the div tag.