Tables/Grid Questions

Hi All,
I am yet another vaadin newbie. I have a couple of question regarding tables/grid.
1.) Horizontal scroll bars? I have a table with 30+ columns to display but the horizontal scroll bar only "parially works…i.e. I can scrool over to see “some” of the columns but not all of them. Is there a trick here that I might be missing?
2.) I am using a BeanItemContainer as the source for my table. How do I assign column names instead of using the default bean field names? How do I change the order in which columns appear?

I have read THE BOOK and gone through the examples and I don’t really see anything to point me in the right direction.


Hi All,
An addition here…I did get the column issues resolved…more reading and more study of the examples helped here.

However, I still am unable to find anything on horizontal scroll bars for tables. Again, I have 30+ columns in a single table view and all must be viewable by the users. I am rather stuck here and don’t know how to move forward on this issue. I will keep digging and searching and if I find something, I will replay to this post with what I found.

Thanks Again.

Hello Mark,

Can you please share with us how you got the column ordering and naming issue solved?
I am facing the same problem in my application and the book does not contain much information.

Thanks in advance,

Hi Diogo,
Sure thing…here is what I have:
//this sets which bean properties to show in the table:
table.setVisibleColumns(new Object{“schedDate”,“peakTotal”,“offPeakTotal”,“peakPayback”,

//this sets the column headings for those visible columns stated above
table.setColumnHeaders(new String{“Date”,“Peak Total”,“Off Peak Total”,“Peak Payback”,
“Off Peak Payback”,“Peak Balance”,“Off Peak Balance”, “Peak Expected Payback”,
“Off Peak Expected Payback”,“Approved”,“Notes”});

Hope this helps…and FYI I am also VERY new to Vaadin so there may be better solutions out there.

Still having issues with the horizontal scrollbars in my table. I think it is related to layouts and how they are used. I now have 1 of 2 of my tables showing the horizontal scrollbar and it seems to be working…but my second table is still having issues. :angry: