Hy, in a ListGrid, on onRecordDrop() i try to :
* update all records on ListGrid
* fetch ListGrid
It's working, but after the final fecth, if i will use again my grid records, i catch this error :
On line : for( ListGridRecord lgr : countryGrid.getRecords() ) {
At method : countryGrid.getRecords()
Trace :
** First Pass ReOrder by Drag Drop ** :
** Second Pass ReOrder by Drag Drop ** :
The last fetch should not refresh ListGrid cache ?
If i comment invalidateCache(), i haven't this error, but no ListGrid visual refresh.
* update all records on ListGrid
* fetch ListGrid
It's working, but after the final fecth, if i will use again my grid records, i catch this error :
Uncaught JavaScript exception [com.google.gwt.dev.shell.HostedModeException: Expected primitive type int; actual value was undefined
At method : countryGrid.getRecords()
Trace :
** First Pass ReOrder by Drag Drop ** :
RecordDropHandler event : An event type
countryGrid != NULL
countryGridgetRecords() != NULL
countryGrid != NULL
countryGridgetRecords() != NULL
RecordDropHandler event : An event type
countryGrid != NULL
Uncaught JavaScript exception [com.google.gwt.dev.shell.HostedModeException: Expected primitive type int; actual value was undefined
countryGrid != NULL
Uncaught JavaScript exception [com.google.gwt.dev.shell.HostedModeException: Expected primitive type int; actual value was undefined
Code:
final ListGrid countryGrid = new ListGrid(); countryGrid.setDataSource(countryDS); countryGrid.setAutoFetchData(true); .... countryGrid.addRecordDropHandler(new RecordDropHandler() { @Override public void onRecordDrop(RecordDropEvent event) { System.out.println("RecordDropHandler event : " + event); if( countryGrid != null ) System.out.println("countryGrid != NULL"); if( countryGrid.getRecords() != null ) System.out.println("countryGridgetRecords() != NULL"); for( ListGridRecord lgr : countryGrid.getRecords() ) { // ReOrder by setAttribute // lgr.setAttribute("orderId", newOrder); countryGrid.updateData(lgr); } countryGrid.invalidateCache(); countryGrid.fetchData(); } });
If i comment invalidateCache(), i haven't this error, but no ListGrid visual refresh.