ggeorg / gwt-mosaic

Automatically exported from code.google.com/p/gwt-mosaic
1 stars 0 forks source link

Error to remove multiple rows in pagingScrollTable #55

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a pagingScrolltable that allows multiple selection
2. Select two or more rows
3. Call removeRow() from MutableTableModel in a loop

What is the expected output? What do you see instead?

It was expected that all rows would be removed with success. However, i got
exception "java.util.ConcurrentModificationException: null".

Please use labels and text to provide additional information.

Looking at classes from gwt, i have observed that the method onRowRemoval()
from RowRemovalHandler is called from MutableTableModel.
Then, PagingScrollTable class implements this handler:

 public void onRowRemoval(RowRemovalEvent event) {
          removeAbsoluteRow(event.getRowIndex());
        }

 The method removeAbsoluteRow calls removeRow() from DataTable() whenever a
row is removed. In my opinion, when one calls removeRow() from
MutableTableModel in a loop, we got a concurrent acess to rows Set in
dataTable throwing an exception.

I don´t know if this question had already been reported. In my opinion, the
problem should be solved with a mutex in removeAbsoluteRow.

Att,

Thiago Lima.

Original issue reported on code.google.com by thiagol...@gmail.com on 23 Jun 2009 at 12:38

GoogleCodeExporter commented 9 years ago
Hi,

please send me some more details, like gwt-mosaic version and PagingScrollTable 
package.

Thanks,
George.

Original comment by georgopo...@gmail.com on 23 Jun 2009 at 4:02

GoogleCodeExporter commented 9 years ago
Sorry.

I´m using these libs:

gwt-beans-binding-0.2.3
gwt-dnd-2.5.6
gwt-incubator-trunk-r1624
gwt-mosaic-0.2.0-rc3

The PagingScrollTable2 that extends
com.google.gwt.gen2.table.client.PagingScrollTable<RowType> in
org.gwt.mosaic.ui.client.table package.

Att,

Thiago;

Original comment by thiagol...@gmail.com on 25 Jun 2009 at 12:20