summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls
diff options
context:
space:
mode:
authorxue <>2006-02-14 17:30:53 +0000
committerxue <>2006-02-14 17:30:53 +0000
commitb8afe4bc5ecc7bcd371d7bd9ca05df356f7aca18 (patch)
tree04cd3c56a06ccb163cc84d0e7b7582d8de47e811 /framework/Web/UI/WebControls
parent45dc5224f9b2eb5f9c24d4eecda2d8a1f6ac5d8c (diff)
Added TDataFieldAccessor and modified TDataGridColumn accordingly.
Diffstat (limited to 'framework/Web/UI/WebControls')
-rw-r--r--framework/Web/UI/WebControls/TDataGridColumn.php13
1 files changed, 2 insertions, 11 deletions
diff --git a/framework/Web/UI/WebControls/TDataGridColumn.php b/framework/Web/UI/WebControls/TDataGridColumn.php
index 925fa90b..6e18a18f 100644
--- a/framework/Web/UI/WebControls/TDataGridColumn.php
+++ b/framework/Web/UI/WebControls/TDataGridColumn.php
@@ -256,19 +256,10 @@ abstract class TDataGridColumn extends TComponent
*/
protected function getDataFieldValue($data,$field)
{
- if(is_array($data))
- return $data[$field];
- else if(($data instanceof TMap) || ($data instanceof TList))
- return $data->itemAt($field);
- else if(($data instanceof TComponent) && $data->canGetProperty($field))
- {
- $getter='get'.$field;
- return $data->$getter();
- }
- else
- throw new TInvalidDataValueException('datagridcolumn_data_invalid',get_class($this),$field);
+ return TDataFieldAccessor::getDataFieldValue($data,$field);
}
+
/**
* Initializes the specified cell to its initial values.
* The default implementation sets the content of header and footer cells.