summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/TDataBoundControl.php
diff options
context:
space:
mode:
authorxue <>2007-02-04 03:30:32 +0000
committerxue <>2007-02-04 03:30:32 +0000
commit633ae42f1c6f7069ba155ffa1bbc3b42fe189bb4 (patch)
tree0df0a4d8a372714f72b57483bd2efcbb84158107 /framework/Web/UI/WebControls/TDataBoundControl.php
parentebe35517b35dc87eaec1333263cb78e9bd4ef2e1 (diff)
Added renderer feature to TRepeater.
Diffstat (limited to 'framework/Web/UI/WebControls/TDataBoundControl.php')
-rw-r--r--framework/Web/UI/WebControls/TDataBoundControl.php41
1 files changed, 41 insertions, 0 deletions
diff --git a/framework/Web/UI/WebControls/TDataBoundControl.php b/framework/Web/UI/WebControls/TDataBoundControl.php
index 6e1d1003..b043060d 100644
--- a/framework/Web/UI/WebControls/TDataBoundControl.php
+++ b/framework/Web/UI/WebControls/TDataBoundControl.php
@@ -542,4 +542,45 @@ class TListItemType extends TEnumerable
const Pager='Pager';
}
+
+/**
+ * IItemDataRenderer interface.
+ *
+ * IItemDataRenderer defines the interface that an item renderer
+ * needs to implement. Besides the {@link getData Data} property, a list item
+ * renderer also needs to provide {@link getItemIndex ItemIndex} and
+ * {@link getItemType ItemType} property.
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ * @version $Id$
+ * @package System.Web.UI.WebControls
+ * @since 3.1.0
+ */
+interface IItemDataRenderer extends IDataRenderer
+{
+ /**
+ * Returns a value indicating the zero-based index of the item in the corresponding data control's item collection.
+ * If the item is not in the collection (e.g. it is a header item), it returns -1.
+ * @return integer zero-based index of the item.
+ */
+ public function getItemIndex();
+
+ /**
+ * Sets the zero-based index for the item.
+ * If the item is not in the item collection (e.g. it is a header item), -1 should be used.
+ * @param integer zero-based index of the item.
+ */
+ public function setItemIndex($value);
+
+ /**
+ * @return TListItemType the item type.
+ */
+ public function getItemType();
+
+ /**
+ * @param TListItemType the item type.
+ */
+ public function setItemType($value);
+}
+
?> \ No newline at end of file