Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GWT CellTable : Add / Delete a row in a CellTable

Tags:

gwt

celltable

Is the GWT CellTable designed to only display records and update the existing ones.

Can one add and delete a record from a CellTable, any pointers to a stable solution.

Thanks

like image 633
user1246570 Avatar asked Dec 27 '22 04:12

user1246570


1 Answers

You can add and remove data rows by manipulating the model object backing the CellTable display.

ListDataProvider<OrderLineWeek> model = new ListDataProvider<OrderLineWeek>();
model.addDataDisplay(myCellTableInstance);

You can then access the list through model.getList(), but you must call model.refresh(), or table.setRowCount(model.getList().size()) if you have added or deleted any rows.

Hope this helps.

like image 69
Jasper Sprengers Avatar answered Jan 02 '23 04:01

Jasper Sprengers