code: private void handleExpansionRequest(final Request request) {
  		String[] paramValue = request.getParameterValues(getId() + ".expanded");
  
  		if (paramValue == null) {
  			paramValue = new String[0];
  		}
  
  		Map<List<Integer>, Object> pageRowKeys = getCurrentRowIndexAndKeys();
  
  		String[] expandedRows = removeEmptyStrings(paramValue);
  		Set<?> oldExpansions = getExpandedRows();
  		Set<Object> newExpansions;
  
  		TableModel model = getTableModel();
  
  		if (model.getRowCount() == 0) {
  			newExpansions = new HashSet<>();
  			expandedRows = new String[0];
  		} else if (getPaginationMode() == PaginationMode.NONE || getPaginationMode() == PaginationMode.CLIENT
  				|| oldExpansions == null || !isPaginated()) {
  			newExpansions = new HashSet<>(expandedRows.length);
  		} else {
  			// row expansions only apply to the current page
  			newExpansions = (Set<Object>) new HashSet<>(oldExpansions);
  			newExpansions.removeAll(pageRowKeys.values());
  		}
  
  		for (String expandedRow : expandedRows) {
  			List<Integer> rowIndex = TableUtil.rowIndexStringToList(expandedRow);
  			Object key = pageRowKeys.get(rowIndex);
  			if (key != null) {
  				newExpansions.add(key);
  			}
  		}
  
  		setExpandedRows(newExpansions);
  	}
docs: Handles a request containing row expansion data.
  
  @param request the request containing row expansion data.