summaryrefslogtreecommitdiff
path: root/framework/Web/UI/TControl.php
diff options
context:
space:
mode:
authorxue <>2006-07-16 01:46:08 +0000
committerxue <>2006-07-16 01:46:08 +0000
commita494b2151b0d9f11f0f16fd4ed8b5340d6735324 (patch)
tree05f4601db44f7ac82c8713094199970d018bfcaf /framework/Web/UI/TControl.php
parent26c3775697fc94086269d54099576679137e5eda (diff)
Fixed #277.
Diffstat (limited to 'framework/Web/UI/TControl.php')
-rw-r--r--framework/Web/UI/TControl.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/framework/Web/UI/TControl.php b/framework/Web/UI/TControl.php
index 583b5f77..ff4a85ea 100644
--- a/framework/Web/UI/TControl.php
+++ b/framework/Web/UI/TControl.php
@@ -452,6 +452,28 @@ class TControl extends TApplicationComponent implements IRenderable, IBindable
}
/**
+ * Returns custom data associated with this control.
+ * A control may be associated with some custom data for various purposes.
+ * For example, a button may be associated with a string to identify itself
+ * in a generic OnClick event handler.
+ * @return mixed custom data associated with this control. Defaults to null.
+ */
+ public function getCustomData()
+ {
+ return $this->getViewState('CustomData',null);
+ }
+
+ /**
+ * Associates custom data with this control.
+ * Note, the custom data must be serializable and unserializable.
+ * @param mixed custom data
+ */
+ public function setCustomData($value)
+ {
+ $this->getViewState('CustomData',$value,null);
+ }
+
+ /**
* @return boolean whether the control has child controls
*/
public function getHasControls()