diff options
author | xue <> | 2006-06-13 02:21:37 +0000 |
---|---|---|
committer | xue <> | 2006-06-13 02:21:37 +0000 |
commit | df05d222194535b6039975a1877bc61455d1abee (patch) | |
tree | 9b32dd2a052906d486fe3db5fd8c68a5359a55a7 | |
parent | 0fbba632e80e8a2d0327fea6c5ef86972494a8eb (diff) |
TRepeater, TDataList and TDataGrid will store data indices in DataKeys if DataKeyField is not set.
-rw-r--r-- | HISTORY | 1 | ||||
-rw-r--r-- | buildscripts/classtree/build.php | 6 | ||||
-rw-r--r-- | framework/Web/UI/WebControls/TDataGrid.php | 4 | ||||
-rw-r--r-- | framework/Web/UI/WebControls/TDataList.php | 4 | ||||
-rw-r--r-- | framework/Web/UI/WebControls/TRepeater.php | 4 |
5 files changed, 15 insertions, 4 deletions
@@ -5,6 +5,7 @@ BUG: Ticket#191 - Duplicated postbacks occur when using TButton with validators BUG: Ticket#213 - PRADO Requirements Checker charset error (Qiang)
CHG: ensureChildControls() is now invoked in TControl::initRecursive (Qiang)
CHG: Postback enabled control will always disable default client-side browser action. (Qiang)
+ENH: TRepeater, TDataList and TDataGrid will store data indices in DataKeys if DataKeyField is not set. (Qiang)
Version 3.0.1 June 4, 2006
==========================
diff --git a/buildscripts/classtree/build.php b/buildscripts/classtree/build.php index ffb4eef3..bc95d1c8 100644 --- a/buildscripts/classtree/build.php +++ b/buildscripts/classtree/build.php @@ -13,7 +13,7 @@ $exclusions=array( );
$a=new ClassTreeBuilder($rootPath,$exclusions);
$a->buildTree();
-$a->saveToFile('classtree.data');
+$a->saveToFile('classes.data');
class ClassTreeBuilder
{
@@ -174,6 +174,10 @@ class ClassTreeBuilder closedir($folder);
return $files;
}
+
+ public function saveAsTagLib($fileName)
+ {
+ }
}
?>
\ No newline at end of file diff --git a/framework/Web/UI/WebControls/TDataGrid.php b/framework/Web/UI/WebControls/TDataGrid.php index d2625c0d..69798c1a 100644 --- a/framework/Web/UI/WebControls/TDataGrid.php +++ b/framework/Web/UI/WebControls/TDataGrid.php @@ -1047,10 +1047,12 @@ class TDataGrid extends TBaseDataList implements INamingContainer $editIndex=$this->getEditItemIndex();
$index=0;
$dsIndex=$ds->getAllowPaging()?$ds->getFirstIndexInPage():0;
- foreach($ds as $data)
+ foreach($ds as $key=>$data)
{
if($keyField!=='')
$keys->add($this->getDataFieldValue($data,$keyField));
+ else
+ $keys->add($key);
if($index===$editIndex)
$itemType=self::IT_EDITITEM;
else if($index===$selectedIndex)
diff --git a/framework/Web/UI/WebControls/TDataList.php b/framework/Web/UI/WebControls/TDataList.php index 0bec8921..b2bd9229 100644 --- a/framework/Web/UI/WebControls/TDataList.php +++ b/framework/Web/UI/WebControls/TDataList.php @@ -1129,10 +1129,12 @@ class TDataList extends TBaseDataList implements INamingContainer, IRepeatInfoUs $hasSeparator=$this->_separatorTemplate!==null;
$selectedIndex=$this->getSelectedItemIndex();
$editIndex=$this->getEditItemIndex();
- foreach($data as $dataItem)
+ foreach($data as $key=>$dataItem)
{
if($keyField!=='')
$keys->add($this->getDataFieldValue($dataItem,$keyField));
+ else
+ $keys->add($key);
if($itemIndex===0 && $this->_headerTemplate!==null)
$this->_header=$this->createItemInternal(-1,'Header',true,null);
if($hasSeparator && $itemIndex>0)
diff --git a/framework/Web/UI/WebControls/TRepeater.php b/framework/Web/UI/WebControls/TRepeater.php index 2070cb1a..9c1cc4ac 100644 --- a/framework/Web/UI/WebControls/TRepeater.php +++ b/framework/Web/UI/WebControls/TRepeater.php @@ -443,10 +443,12 @@ class TRepeater extends TDataBoundControl implements INamingContainer $items=$this->getItems();
$itemIndex=0;
$hasSeparator=$this->_separatorTemplate!==null;
- foreach($data as $dataItem)
+ foreach($data as $key=>$dataItem)
{
if($keyField!=='')
$keys->add($this->getDataFieldValue($dataItem,$keyField));
+ else
+ $keys->add($key);
if($itemIndex===0 && $this->_headerTemplate!==null)
$this->_header=$this->createItemInternal(-1,self::IT_HEADER,true,null);
if($hasSeparator && $itemIndex>0)
|