Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to refresh a single row in a table?

Tags:

java

vaadin

Is it possible to refresh a single row of a vaadin table component?

So far, if table row editing is finished, I'm just refreshing the whole table:

table.refreshRowCache();

But that will probably cause performance issues later for large tables. So, how could a single row be refreshed?

like image 668
membersound Avatar asked Sep 29 '13 11:09

membersound


1 Answers

I found this on the Vaadin forum which seems useful: https://vaadin.com/forum/#!/thread/408555/408554

I haven't yet given it a go but, Henri Sara (Vaadin developer) suggested this solution:

Property statusProperty = pqTable.getContainerProperty(itemId, "statusString");
if (property instanceof MethodProperty) {
    ((MethodProperty) statusProperty).fireValueChange();
}

He also notes that this method may change in a future version (and may have done so already :S)

like image 137
Dylan Watson Avatar answered Oct 20 '22 01:10

Dylan Watson