Why client side changes table page length when Table height is fixed


I am seeing that in my table the page length gets changed when ever there is UI action in browser(but only for certain button click). And this is causing the table not to display all the table rows that i want to display. Whats the reason behind this? I have only one table in a page with height 500px and page length say 17. my table cache ratio is 0.1.
I have some navigation buttons(previous, next and refresh) in another layout on top of the table. When ever previous and next buttons are clicked the page length does not change But when ever refresh button is clicked the page length is set to 3 sometimes 4 from the [code]
public void changeVariables(Object source, Map<String, Object> variables)
// Client might update the pagelength if Table height is fixed
if (variables.containsKey(“pagelength”)) {
// Sets pageLength directly to avoid repaint that setter causes
pageLength = (Integer) variables.get(“pagelength”);

[/code] Why is this So? and how can i avoid this? The user requirement is that the table height should be fixed. in this scenario how do i display all the rows whenever refresh is clicked?

Sounds like a problem in the client-side component’s bodyHeight/rowHeight calculations. Are all of your rows the same height? Current implementation of Table doesn’t support varying row heights and that might certainly cause these kind of problems. If that’s not it, sounds like a bug to me. If you could write a
and provide a simple sample application and steps to reproduce the unwanted behaviour it would help a lot in hunting down the problem. There have also been quite a few changes to the Table lately, so remember to mention which Vaadin version you are using.

As for possible workarounds, I would need to know a bit more about the underlying cause for that as well, so again a bit of code (and the Vaadin version) would help :slight_smile:

Just noting that this issue was already ‘resolved’
. Basically it’s down to varying row heights due to wrapping being enabled for Labels within generated columns.


Thanks Anna and Teppo

Indeed we had variable row heights and fixed table length. After long discussion with client about the short comings of using Vaadin we decided to let go of the fixed height of the table. Now the whole table loads when refresh is clicked. thanks again.