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.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.