aspose file tools
The moose likes JSF and the fly likes Need to scroll database table. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » JSF
Reply Bookmark "Need to scroll database table." Watch "Need to scroll database table." New topic
Author

Need to scroll database table.

Dave Trower
Ranch Hand

Joined: Feb 12, 2003
Posts: 79
I have a database table on a JSF page. Most of the time it looks OK but if the database table has too many elements then it overwrites components that are below the table. Is there an easy way to control the size the table and have it have scroll bars if it is too big.
badri nath
Ranch Hand

Joined: Dec 21, 2005
Posts: 57
Are you allowed to use pagination?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 14573
    
    7

Originally posted by Dave Trower:
I have a database table on a JSF page. Most of the time it looks OK but if the database table has too many elements then it overwrites components that are below the table. Is there an easy way to control the size the table and have it have scroll bars if it is too big.


Not with the core JSF datatable control. You might be able to find an Javascript-based extension that can. If not, Apache Tomahawk has a pageable datatable control. BTW, Javascript is not AJAX, which is why I didn't say AJAX. AJAX means actual dynamic page update via server communications, where plain javascript can work without any further talking to the server.

For your purposes, AJAX might be helpful, but if the max table size is small enough it's not essential. Javascript, on the other hand, is about the only way you can make a multi-column interactively scrollable table control in HTML (Flash &Co. don't count as far as I'm concerned).

HTML has always been a pain regarding setting display element heights. It usually uses the vertical dimension to adjust for constraints on horizontal layout.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need to scroll database table.
 
Similar Threads
JTable and Horizontal Scroll Bar
Table nested inside a div
Problem with JTable
need to add scroll bar to table ( with sashform)
html table help needed