BUGFIX Removing overloaded TableField->sourceItems() method, which enables features of the underlying TableListField implementation, such as pagination and source item caching (fixed #5965, thanks martijn) (from r111492)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112907 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2010-10-19 03:56:23 +00:00
parent 976f96ee0a
commit 29515b2e01

View File

@ -150,28 +150,7 @@ class TableField extends TableListField {
function ItemCount() {
return count($this->fieldList);
}
/**
* Returns the databased saved items, from DataObjects
*
* @return DataObjectSet
*/
function sourceItems() {
if($this->customSourceItems) {
$items = $this->customSourceItems;
} elseif($this->cachedSourceItems) {
$items = $this->cachedSourceItems;
} else {
// get query
$dataQuery = $this->getQuery();
// get data
$records = $dataQuery->execute();
$items = singleton($this->sourceClass)->buildDataObjectSet($records);
}
return $items;
}
/**
* Displays the items from {@link sourceItems()} using the encapsulation object.
* If the field value has been set as an array (e.g. after a failed validation),