This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have a rich faces data table. And I need to add a simple vertical scroll when the number of rows is bigger than 5. But I couldn’t find any way to do this.
So I used a rich faces data scroll "<rich:datascroller ... ". It is working fine but my grid contains a field that takes its value from a drop down list. If I select a value in page 1 then paginate to page 2 then go back to page one the selection is lost.
So can anyone help me in solving one of these problems?
1- Add a vertical scroll to data grid ( Note, I can’t use scrollable data grid), or
2- How to keep the selection while pagination using rich faces scroll
Joined: Aug 14, 2007
Ok, I figure it out ,
I was able to add a data scroll by using this tag :
<div style="height:150px ; width:100%; overflow-x:auto; overflow-y:scroll">
<rich:dataTable …… >
Surrounding the data table.
Also use <h:selectOneMenu> instead of <rich:comboBox> if you have a list cell. As the later looked like unattached to the grid while scrolling
Ro Ah asked/answered that question in 2009. And did it the hard way, BTW, since there's a scrollable extendedDataTable tag in RichFaces.
The problem with asking people 3 years later is that they probably aren't interested any more, and considering the lack of employer/employee loyalty these days, probably don't work in the same place or deal with the same issues anymore.