code: private void handleSortRequest(final Request request) {
  		String sortColStr = request.getParameter(getId() + ".sort");
  		String sortDescStr = request.getParameter(getId() + ".sortDesc");
  
  		if (sortColStr != null) {
  			if ("".equals(sortColStr)) {
  				// Reset sort
  				setSort(-1, false);
  				getOrCreateComponentModel().rowIndexMapping = null;
  			} else {
  				try {
  					int sortCol = Integer.parseInt(sortColStr);
  					// Allow for column order
  					int[] cols = getColumnOrder();
  					if (cols != null) {
  						sortCol = cols[sortCol];
  					}
  					boolean sortAsc = !"true".equalsIgnoreCase(sortDescStr);
  
  					// Only process the sort request if it differs from the current sort order
  					if (sortCol != getSortColumnIndex() || sortAsc != isSortAscending()) {
  						sort(sortCol, sortAsc);
  						setFocussed();
  					}
  				} catch (NumberFormatException e) {
  					LOG.warn("Invalid sort column: " + sortColStr);
  				}
  			}
  		}
  	}
docs: Handles a request containing sort instruction data.
  
  @param request the request containing sort instruction data.