code: public void setDataModel(final TableDataModel dataModel) {
  		getOrCreateComponentModel().dataModel = dataModel;
  		getOrCreateComponentModel().rowIndexMapping = null;
  
  		if (dataModel instanceof BeanTableDataModel) {
  			((BeanTableDataModel) dataModel).setBeanProvider(new DataTableBeanProvider(this));
  			((BeanTableDataModel) dataModel).setBeanProperty(".");
  		}
  
  		if (dataModel instanceof ScrollableTableDataModel) {
  			int startIndex = getCurrentPage() * getRowsPerPage();
  			int endIndex = startIndex + getRowsPerPage() - 1;
  			((ScrollableTableDataModel) dataModel).setCurrentRows(startIndex, endIndex);
  		}
  
  		// Flush the repeater's row contexts and scratch maps
  		repeater.reset();
  	}
docs: Sets the data model.
  
  @param dataModel The dataModel to set.