Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Need to scroll database table.  RSS feed

 
Dave Trower
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you allowed to use pagination?
 
Tim Holloway
Bartender
Posts: 18662
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!