-
Bug
-
Resolution: Fixed
-
Blocker
-
7.0.2, 6.5.7, 7.0.3
-
None
reproduce step.
1. make a Listbox
2. make a ListModelList and set is model of Listbox
3. set ListModelList.setMultiple = true
4. ListModelList have >= 3 item
5. select all item in listBox by press shift and select top, bottom item
6. call ListModelList.removeRange (0, size) to remove all item in mode.
=> exception outOfBoundIndex is raise.
reason:
consider: method ListBox.doSelectionChanged () method is call when each item is remove.
consider below code block. example model has 3 item
for (final Listitem item: _items) {
1. if (item.isLoaded())
6. if (selCnt == expSelCnt && selCnt >= _selItems.size())
7. break; //done (all selected items are sync)
}
when item 1 is remove, this block of code is execute. _items.size = _model.size everything is ok.
when item 2 is remove, this block of code is execute. _items.size = _model.size + 1
and index of selected item in listBox and model is not sync. but logic of code see it's sync.
=> this for run 3 time (= length of listBox) and out of index of model.