From 3071d459eee19f9b01ec0a6241615562548d5fef Mon Sep 17 00:00:00 2001
From: xue <>
Date: Tue, 13 Dec 2005 18:57:22 +0000
Subject: Added clearViewState and clearControlState.

---
 framework/Web/UI/TControl.php | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

(limited to 'framework')

diff --git a/framework/Web/UI/TControl.php b/framework/Web/UI/TControl.php
index 6e36c123..b50caeca 100644
--- a/framework/Web/UI/TControl.php
+++ b/framework/Web/UI/TControl.php
@@ -656,6 +656,15 @@ class TControl extends TComponent
 			$this->_rf[self::RF_CONTROLSTATE][$key]=$value;
 	}
 
+	/**
+	 * Clears a controlstate value.
+	 * @param string the name of the controlstate value to be cleared
+	 */
+	protected function clearControlState($key)
+	{
+		unset($this->_rf[self::RF_CONTROLSTATE][$key]);
+	}
+
 	/**
 	 * Returns a viewstate value.
 	 *
@@ -688,6 +697,15 @@ class TControl extends TComponent
 			$this->_viewState[$key]=$value;
 	}
 
+	/**
+	 * Clears a viewstate value.
+	 * @param string the name of the viewstate value to be cleared
+	 */
+	protected function clearViewState($key)
+	{
+		unset($this->_viewState[$key]);
+	}
+
 	/**
 	 * Sets up the binding between a property (or property path) and an expression.
 	 * The context of the expression is the control itself.
-- 
cgit v1.2.3