code: private void paintPaginationDetails(final WTable table, final XmlStringBuilder xml) {
  		TableModel model = table.getTableModel();
  
  		xml.appendTagOpen("ui:pagination");
  
  		xml.appendAttribute("rows", model.getRowCount());
  		xml.appendOptionalAttribute("rowsPerPage", table.getRowsPerPage() > 0, table.
  				getRowsPerPage());
  		xml.appendAttribute("currentPage", table.getCurrentPage());
  
  		switch (table.getPaginationMode()) {
  			case CLIENT:
  				xml.appendAttribute("mode", "client");
  				break;
  			case DYNAMIC:
  				xml.appendAttribute("mode", "dynamic");
  				break;
  			case NONE:
  				break;
  			default:
  				throw new SystemException("Unknown pagination mode: " + table.
  						getPaginationMode());
  		}
  
  		if (table.getPaginationLocation() != WTable.PaginationLocation.AUTO) {
  			switch (table.getPaginationLocation()) {
  				case TOP:
  					xml.appendAttribute("controls", "top");
  					break;
  				case BOTTOM:
  					xml.appendAttribute("controls", "bottom");
  					break;
  				case BOTH:
  					xml.appendAttribute("controls", "both");
  					break;
  				default:
  					throw new SystemException("Unknown pagination control location: " + table.getPaginationLocation());
  			}
  		}
  		xml.appendClose();
  		// Rows per page options
  		if (table.getRowsPerPageOptions() != null) {
  			xml.appendTag("ui:rowsselect");
  			for (Integer option : table.getRowsPerPageOptions()) {
  				xml.appendTagOpen("ui:option");
  				xml.appendAttribute("value", option);
  				xml.appendEnd();
  			}
  			xml.appendEndTag("ui:rowsselect");
  		}
  		xml.appendEndTag("ui:pagination");
  
  	}
docs: Paint the pagination aspects of the table.
  @param table the WDataTable being rendered
  @param xml the string builder in use