File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
    Bookmark Topic Watch Topic
  • New Topic

Scroll and Datatable

 
Ro Ah
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi All,
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

Thanks
 
Ro Ah
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
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 …… >
</div>
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

thanks
 
Vimal Kumar Venugopal
Ranch Hand
Posts: 43
Eclipse IDE Java Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Thank you Ro Ah...

Would you please tell me how to add scroll bar to a <h:selectOneMenu>?
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17622
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Sorry, Ron. You've resurrected a zombie.

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.

In any event, he basically did what I recommended in my response to your original query about your problem in the thread at http://www.coderanch.com/t/568826/JSF/java/scroll-bar-selectOneMenu

I'm going to lock this thread, so people won't start responding helter-skelter to both that thread and this one. That gets confusing.
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic