ProgressIndicator polling + Table cell updates?

I’m using the ProgressIndicator trick to get a label on my panel to update, works fine. I’m trying to also update a String in a Table cell, but am not sure how to do that?

I have discovered that I can use table.removeItem(id) to remove the whole row then re-add the row with table.addItem(Object, id), but this seems likes too much work.

I’ve tried keeping a LinkedList<Object> of rows in my table and just updating the corresponding object, e.g. listOfRows.get(0)[0]
= “newValue”;, but this has no effect on the displayed value in the browser.

Is there some other way besides deleting the whole row and re-adding it?

Hmm, sorry about this post falling between the cracks. I’ll try to help :slight_smile:

So if I understood you correctly you basically have a column on a specific row that you want updated?

If you know the item id (or the row number) of the item on the row, you can ask the Table component for this item and update it’s properties. In this way, the table will be notified of the change and redraw the relevant rows/columns.

Example code:

    // itemId is the id you used when you added the row to the table
    Item rowItem = myTable.getItem(itemId);
    // Then you update the property identified by the column identifier

Hope this helps, don’t hesitate to ask more! We’ll try to get your questions answered quicker in the future…