• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Need to scroll database table.

 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you allowed to use pagination?
 
Saloon Keeper
Posts: 27808
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Always! Wait. Never. Shut up. Look at this tiny ad.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic