summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/TRepeater.php
diff options
context:
space:
mode:
authorxue <>2006-07-21 16:14:01 +0000
committerxue <>2006-07-21 16:14:01 +0000
commitc0d9d27f16bae2e428225302da144e9cc6d4adc8 (patch)
treeef7b611d7c87931a3fcfcaf9e4cbb94641640f63 /framework/Web/UI/WebControls/TRepeater.php
parent0c16571c091f8c4c89ae18427b2c2994cd4cf3bb (diff)
merge from 3.0 branch till 1281.
Diffstat (limited to 'framework/Web/UI/WebControls/TRepeater.php')
-rw-r--r--framework/Web/UI/WebControls/TRepeater.php18
1 files changed, 16 insertions, 2 deletions
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