}
public void doMoveDownSelectedDetailItems()
{
final List<FieldWrapper> details = getDetailFields();
final XulListbox detailList = (XulListbox) getDocument().getElementById(DETAIL_FIELDS_LIST_ID);
final int[] selectedIndices = detailList.getSelectedIndices();
Arrays.sort(selectedIndices);
reverseArray(selectedIndices);
for (final int selectedRow : selectedIndices)
{
final FieldWrapper detail = details.remove(selectedRow);
details.add(selectedRow + 1, detail);
}
setDetailFields(details);
// update the selection to move with the items
detailList.setSelectedIndices(getNewSelections(selectedIndices, DIRECTION.DOWN));
}