Version: smartgwt-power-5.0-p20150731
On version 4.1, we had ListGrid subclass with move up/down buttons (created by overriding createRecordComponent) to allow users to reorder rows.
Our code was for move up was:
With 5.0-p20150731, this code starts a indefinite 100% cpu use with the calls:
isc_c_Timer__fireTimeout
isc_c_Class_fireCallback
isc_c_Canvas_clearRedrawQueue
isc_c_Canvas_clearDestroyQueue
We managed to work that around at the cost of some flicker effect, with:
We'd like to use our previous code to avoid the flicker. Is there anything wrong with it that could cause the issue?
On version 4.1, we had ListGrid subclass with move up/down buttons (created by overriding createRecordComponent) to allow users to reorder rows.
Our code was for move up was:
Code:
private void moveUp(ListGridRecord record) { RecordList rs = getRecordList(); int index = getRecordIndex(record); if (index > 0) { rs.removeAt(index); rs.addAt(record, index - 1); } }
isc_c_Timer__fireTimeout
isc_c_Class_fireCallback
isc_c_Canvas_clearRedrawQueue
isc_c_Canvas_clearDestroyQueue
We managed to work that around at the cost of some flicker effect, with:
Code:
private void moveUp(final ListGridRecord record) { final RecordList rs = getRecordList(); final int index = getRecordIndex(record); if (index > 0) { rs.removeAt(index); Scheduler.get().scheduleDeferred(new Command() { @Override public void execute() { rs.addAt(record, index - 1); } }); } }
Comment