How to update one row in a table?

Is it possible to update one row of a vaadin table component?

So far, if the editing of the table row is finished, I just update the whole table:

table.refreshRowCache();

But this can lead to performance problems later for large tables. So how to update one line?

+6
source share
2 answers

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

I haven’t entered yet, but Henri Sarah (Vaadin developer) has proposed 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 already done this: S)

+3
source

beanItemContainer your beanItemContainer

2. table.refreshRowCache();

Example:

 beanItemContainer.getItem(itemId).getItemProperty("quantity").setValue(productEditor.getProduct().getQuantity()); table.refreshRowCache(); 
0
source

Source: https://habr.com/ru/post/954883/


All Articles