Table space issue

Hi all

I have been using pagination table for my requirement. I need the pagination table many times so i am using a single paged table class in which page length is fixed to 10 for all pagination table. But now for one of the pagination table i need the pagination table to cover the entire screen. By reusing the paged table class how to set the table height such that it covers the entire screen without making any changes to paged table?

Thanks

Are you using the
PagedTable
addon or do you have your own implementation of a paged table? Anyway, the paging of these paged table implementations is done by modifying the page length variable in the native Vaadin table (setPageLength). The page length value will determine how many rows there should be visible in each table page. Practically, this means, that your table’s height should be fixed.

Now, in your case, you’d like to have the table to be of relative height (so that it expands when the screen is resized). The only way I see that you can make this work, is to call table.setHeight(“100%”) for your table AND define a high enough page length so that it will fill the table. The down side is, that on smaller screen resolutions, you’ll get a scrollbar in the table.

Another option would be, that you change the client side code of the paged table so, that whenever the screen is resized, it will dynamically change page length of your paged table. This latter option may not be as easy to implement as what it sounds, as it requires some GWT coding and possibly extending/modifying the client side table code, which can be quite tedious to do.

I am using my own custom class that is called paged table class. As you said i have set the page length but this page length is set in the paged table class. I have set page length to 10. As i said in the earlier post i have many pagination tables and all are reusing the paged table class. But the problem is only one pagination table needs page length more than 10 but it is using the paged table class. My question is without changing the paged table class how can i have a pagination table having page length more than 10?

You don’t need to modify the PagedTable class just to change the page length, you can do it like this

// First paged table with page length 10
PagedTable table1  = new PagedTable();
table1.setPageLength(10);

// Second paged table with page length 50
PagedTable table2 = new PagedTable();
table2.setPageLength(50);

You just need two different instances of a class, not to implementations of it.