diff options
author | xue <> | 2006-07-18 12:46:30 +0000 |
---|---|---|
committer | xue <> | 2006-07-18 12:46:30 +0000 |
commit | 17f5a7e22cd511abbddf7111fc8bab751d3dc7e6 (patch) | |
tree | 2bca8bbda798872520d560021d47afc1925937a0 /framework | |
parent | a494b2151b0d9f11f0f16fd4ed8b5340d6735324 (diff) |
Documentation update.
Diffstat (limited to 'framework')
-rw-r--r-- | framework/Web/UI/WebControls/TDataGrid.php | 14 | ||||
-rw-r--r-- | framework/Web/UI/WebControls/TDataList.php | 14 | ||||
-rw-r--r-- | framework/Web/UI/WebControls/TRepeater.php | 18 |
3 files changed, 44 insertions, 2 deletions
diff --git a/framework/Web/UI/WebControls/TDataGrid.php b/framework/Web/UI/WebControls/TDataGrid.php index f7697fec..2687ac35 100644 --- a/framework/Web/UI/WebControls/TDataGrid.php +++ b/framework/Web/UI/WebControls/TDataGrid.php @@ -43,6 +43,12 @@ Prado::using('System.Web.UI.WebControls.TPanel'); * To change the state of an item, set {@link setEditItemIndex EditItemIndex}
* or {@link setSelectedItemIndex SelectedItemIndex} property.
*
+ * Each datagrid item has a {@link TDataGridItem::getItemType type}
+ * which tells the position and state of the item in the datalist. An item in the header
+ * of the repeater is of type 'Header'. A body item may be of either
+ * 'Item', 'AlternatingItem', 'SelectedItem' or 'EditItem', depending whether the item
+ * index is odd or even, whether it is being selected or edited.
+ *
* A datagrid is specified with a list of columns. Each column specifies how the corresponding
* table column will be displayed. For example, the header/footer text of that column,
* the cells in that column, and so on. The following column types are currently
@@ -128,6 +134,14 @@ Prado::using('System.Web.UI.WebControls.TPanel'); * every newly created datagrid item. You can respond to this event to customize
* the content or style of the newly created item.
*
+ * Note, the data bound to the datagrid are reset to null after databinding.
+ * There are several ways to access the data associated with a datagrid row:
+ * - Access the data in {@link onItemDataBound OnItemDataBound} event
+ * - Use {@link getDataKeys DataKeys} to obtain the data key associated with
+ * the specified datagrid row and use the key to fetch the corresponding data
+ * from some persistent storage such as DB.
+ * - Save the data in viewstate and get it back during postbacks.
+ *
* @author Qiang Xue <qiang.xue@gmail.com>
* @version $Revision: $ $Date: $
* @package System.Web.UI.WebControls
diff --git a/framework/Web/UI/WebControls/TDataList.php b/framework/Web/UI/WebControls/TDataList.php index 2c562d6d..42c47f86 100644 --- a/framework/Web/UI/WebControls/TDataList.php +++ b/framework/Web/UI/WebControls/TDataList.php @@ -85,12 +85,26 @@ Prado::using('System.Web.UI.WebControls.TRepeatInfo'); * event will be raised. Note, the selected index may not be actually changed.
* The event mainly informs the server side that the end-user has made a selection.
*
+ * Each datalist item has a {@link TDataListItem::getItemType type}
+ * which tells the position and state of the item in the datalist. An item in the header
+ * of the repeater is of type 'Header'. A body item may be of either
+ * 'Item', 'AlternatingItem', 'SelectedItem' or 'EditItem', depending whether the item
+ * index is odd or even, whether it is being selected or edited.
+ *
* TDataList raises an {@link onItemCommand OnItemCommand} whenever a button control
* within some TDataList item raises a <b>OnCommand</b> event. If the command name
* is one of the followings: 'edit', 'update', 'select', 'delete', 'cancel' (case-insensitive),
* another event will also be raised. For example, if the command name is 'edit',
* then the new event is {@link onEditCommand OnEditCommand}.
*
+ * Note, the data bound to the datalist are reset to null after databinding.
+ * There are several ways to access the data associated with a datalist item:
+ * - Access the data in {@link onItemDataBound OnItemDataBound} event
+ * - Use {@link getDataKeys DataKeys} to obtain the data key associated with
+ * the specified datalist item and use the key to fetch the corresponding data
+ * from some persistent storage such as DB.
+ * - Save the data in viewstate and get it back during postbacks.
+ *
* @author Qiang Xue <qiang.xue@gmail.com>
* @version $Revision: $ $Date: $
* @package System.Web.UI.WebControls
diff --git a/framework/Web/UI/WebControls/TRepeater.php b/framework/Web/UI/WebControls/TRepeater.php index eb599341..01c88a30 100644 --- a/framework/Web/UI/WebControls/TRepeater.php +++ b/framework/Web/UI/WebControls/TRepeater.php @@ -36,6 +36,12 @@ Prado::using('System.Util.TDataFieldAccessor'); * {@link setSeparatorTemplate SeparatorTemplate}, if not empty, will be
* displayed between items.
*
+ * Each repeater item has a {@link TRepeaterItem::getItemType type}
+ * which tells the position of the item in the repeater. An item in the header
+ * of the repeater is of type TRepeater::IT_HEADER. A body item may be of either
+ * TRepeater::IT_ITEM or TRepeater::IT_ALTERNATINGITEM, depending whether the item
+ * index is odd or even.
+ *
* You can retrive the repeated contents by the {@link getItems Items} property.
* The header and footer items can be accessed by {@link getHeader Header}
* and {@link getFooter Footer} properties, respectively.
@@ -46,10 +52,18 @@ Prado::using('System.Util.TDataFieldAccessor'); * databinding, an {@link onItemDataBound OnItemDataBound} event will be raised.
*
* TRepeater raises an {@link onItemCommand OnItemCommand} whenever a button control
- * within some repeater item raises a <b>Command</b> event. Therefore,
- * you can handle all sorts of <b>Command</b> event in a central place by
+ * within some repeater item raises a <b>OnCommand</b> event. Therefore,
+ * you can handle all sorts of <b>OnCommand</b> event in a central place by
* writing an event handler for {@link onItemCommand OnItemCommand}.
*
+ * Note, the data bound to the repeater are reset to null after databinding.
+ * There are several ways to access the data associated with a repeater item:
+ * - Access the data in {@link onItemDataBound OnItemDataBound} event
+ * - Use {@link getDataKeys DataKeys} to obtain the data key associated with
+ * the specified repeater item and use the key to fetch the corresponding data
+ * from some persistent storage such as DB.
+ * - Save the data in viewstate and get it back during postbacks.
+ *
* @author Qiang Xue <qiang.xue@gmail.com>
* @version $Revision: $ $Date: $
* @package System.Web.UI.WebControls
|