Simple problem with Table component

Hi all,

I’ve got a problem in my Vaadin portlet. It’s using a table to display a list of items and a form to the right. When the user clicks a table row, it populates all the content on the form on the right (by triggering on value event change). All well and good!

FYI, I have single row configured

Now, the problem. I have a nice shiny ADD button. When I click on it, I want to force the form to empty and for any table selection to be removed. I seem to face a race condition!

When I fire the table.select(null) that works

but

I need to stop any future selections, so I immediately have table.setSelectable(false)

If I add this, the table row doesn’t become deselected because I guess the selection disable prevents it? If I do the other way, I see the selection is disabled, but the row is obviously left as-is.

Any ideas?? Is there something I’m failing to do? I.E. Should I be calling in some form of fire and wait format??

Kind regards

sp33dy

Discovered it was purely a refresh issue! Looks like the table doesn’t refresh if you issue an unselect(id), setValue(null) or set select(null) with a setSelectable(false) directly after!!! This is in v6 of vaadin that is bundled with Liferay 6 out of the box. I’ve got round the problem with the hack of resetting the containerdatasource of the table to itself; which forces the component to redraw! Thus fixing my problem.

Sounds like a bug to me. How about you create a minimalistic test case of this and report it to dev.vaadin.com? Just the table and the button. It would be great to get things like these logged. Thanks!