String[] selectedBoxes =
parameters.get(tableId+NamingContainer.SEPARATOR_CHAR+SELECTED_KEY);
// must work with both table and hgrid:
final RowKeySet selectionModel;
if (table instanceof UIXTable)
selectionModel = ((UIXTable) table).getSelectedRowKeys();
else
selectionModel = ((UIXTree) table).getSelectedRowKeys();
// Object selectMode = tableMap.get(UIConstants.SELECT_MODE_KEY);
// // select-all/none across all ranges (both visible and invisible)
// // is disabled for EA6. This is because it is pretty bad if in the email
// // demo the user does a select-all followed by delete and all of his/her
// // messages (including the ones that are currently not visible) are deleted.
// if (false && (selectMode != null))
// {
// if ("all".equals(selectMode))
// selectionModel.addAll();
// else if ("none".equals(selectMode))
// selectionModel.clear();
//
// // even if we do a select all/none we still need to run through the
// // regular per row selection code below. this is because the user might
// // have clicked select-all and then deselected some rows before submitting:
// }
RowKeySet selectedDelta = selectionModel.clone();
selectedDelta.clear();
RowKeySet unselectedDelta = selectedDelta.clone();
_setDeltas(table, selectedBoxes, unselectedBoxes,
selectionModel, selectedDelta, unselectedDelta);
if ((selectedDelta.getSize() != 0) || (unselectedDelta.getSize() != 0))
{
FacesEvent event =
new SelectionEvent(table, unselectedDelta, selectedDelta);
event.queue();
}