EShaw
27 Jul 2009, 11:49 AM
I'm trying to get selected items from a Grid with a CheckBoxSelectionModel AFTER a button press.
Grid<MyGridDataModel> grid;
List<MyGridDataModel> data = grid.getSelectionModel().getSelectedItems();
The grid is constructed within the RPC onSuccess() method but I need to access it outside the method to obtain the selected items. Normally, I would create a final Grid class outside onSuccess(), however, I am unable to do this -- I'm getting a "constructor Grid<..> is not visible" error and there is no default constructor.
Could someone please describe how I might call grid.getSelectionModel().getSelectedItems() outside onSuccess()?
Regards
Erin
Grid<MyGridDataModel> grid;
List<MyGridDataModel> data = grid.getSelectionModel().getSelectedItems();
The grid is constructed within the RPC onSuccess() method but I need to access it outside the method to obtain the selected items. Normally, I would create a final Grid class outside onSuccess(), however, I am unable to do this -- I'm getting a "constructor Grid<..> is not visible" error and there is no default constructor.
Could someone please describe how I might call grid.getSelectionModel().getSelectedItems() outside onSuccess()?
Regards
Erin