code: private void handleSelectionRequest(final Request request) {
  		String[] paramValue = request.getParameterValues(getId() + ".selected");
  
  		if (paramValue == null) {
  			paramValue = new String[0];
  		}
  
  		String[] selectedRows = removeEmptyStrings(paramValue);
  		List<Integer> oldSelections = getSelectedRows();
  		List<Integer> newSelections;
  
  		boolean singleSelect = SelectMode.SINGLE.equals(getSelectMode());
  
  		if (getDataModel().getRowCount() == 0) {
  			newSelections = new ArrayList<>();
  			selectedRows = new String[0];
  		} else if (getPaginationMode() == PaginationMode.NONE
  				|| getPaginationMode() == PaginationMode.CLIENT
  				|| oldSelections == null) {
  			newSelections = new ArrayList<>(selectedRows.length);
  		} else if (singleSelect && selectedRows.length > 0) {
  			// For single-select, we need to remove the old entries
  			newSelections = new ArrayList<>(1);
  		} else {
  			// For multi-select, we need to entries for the current page only
  			newSelections = new ArrayList<>(oldSelections);
  
  			int startRow = getCurrentPageStartRow();
  			int endRow = getCurrentPageEndRow();
  			newSelections.removeAll(getRowIds(startRow, endRow));
  		}
  
  		for (String selectedRow : selectedRows) {
  			try {
  				newSelections.add(Integer.parseInt(selectedRow));
  
  				if (singleSelect) {
  					break;
  				}
  			} catch (NumberFormatException e) {
  				LOG.warn("Invalid row id for selection: " + selectedRow);
  			}
  		}
  
  		setSelectedRows(newSelections);
  
  		// If there is a selection change action specified, it may need to be fired
  		Action selectionChangeAction = getSelectionChangeAction();
  
  		if (selectionChangeAction != null && !newSelections.equals(oldSelections)) {
  			selectionChangeAction.execute(new ActionEvent(this, "selection"));
  		}
  	}
docs: Handles a request containing row selection data.
  
  @param request the request containing row selection data.