reorder columns in a table doesn´t work

Hi all,

I´m using Vaadin 7.1.5.
Im using a table with setColumnReorderingAllowed(true). When a user changes the order of the columns the new order will be saved and reloaded when the user reloads the page with the table. In debug i can see, that the new order was set correctly, but the displayed order is still the default order.
To make sure, that the order is set correctly I called getVisibleColumns() directly after setting them.
getVisibleColumns() showed the desired order, but the table did not displays it. I added
refreshRowCache();
markAsDirty();
to make sure the display will be repainted, but this didn´t help either.
Rezise of columns were stored and reloaded the same way and worked fine.

Any help is highly appreciated.
Thanks,
Santiago

Hi Santiago,

Can you share the part of the code where you set the table columns? Calling setVisibleColumns() should trigger a visual refresh for the table, so I’m wondering if something else possibly overrides the values you’re setting.

Hi Olli,

first i am sorry, that I didn´t post my solution immediately when I found it.
It works now.
When I first set the visibleColumns i was using an String, I changed that by casting to an Object
and now everything works fine.

Thank you for your time spent thinking on that.