Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Updating GWT Cell Table at runtime

Tags:

widget

gwt

gwt2

I am trying to update a cell table at run time, the cell table gets its date from a list

Cell_Table.setRowData(0,AllMessages);

I am trying to update the List AllMessages then do this Cell_Table.redraw(); with no success.

I am trying this do this again Cell_Table.setRowData(0,AllMessages); with no success AS WELL

when I am using the same technique to add rows, everything is ok but when i am removing some data from the list feeding it, the cell table is not being updated!

like image 773
Noor Avatar asked Dec 07 '25 09:12

Noor


1 Answers

by
John LaBanca

@ GWT Discussion

setRowData(int, List) replaces the range of data. So, if the list gets shorted, it doesn't touch the items that appear after the end of the list.

You have to update the row count as well: table.setRowData(0, NewMessages); table.setRowCount(NewMessages.size(), true);

Or, you can use the new version of setRowData that does not take a start index (since GWT 2.1.1): table.setRowData(NewMessages);

like image 75
Noor Avatar answered Dec 10 '25 21:12

Noor