PagedTable -- showing maximum rows based on window size?

Hej!

Working with pagedTable (to speed up the rendering of a large table via JPAContainer that does a pretty inefficient method to get data) and everything is pretty cool.

The one thing my users would like though, is to set the pageLength() to the approximate # of rows that can be displayed within the browser window. The pagedTable is properly maximized to fill in the area, except the default pageLength is 10 rows.

I tried the old trick using a table of setting the pageLength to the # of visibleItemIds.size() but – that return 10 because – that’s the # of visible items I guess since that’s the default page size! LOL …

So how can I get the # of POSSIBLE visible rows we could display and set the pagelength to that? This would seem to be a fairly common recurring pattern?

Obviously if the user changes the Browser window size that would have to be refreshed too, but that’s a subject for a different day.

TIA!

/SJM