diff options
Diffstat (limited to 'framework/Web/UI')
-rw-r--r-- | framework/Web/UI/TControl.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/framework/Web/UI/TControl.php b/framework/Web/UI/TControl.php index a4625d18..435f3905 100644 --- a/framework/Web/UI/TControl.php +++ b/framework/Web/UI/TControl.php @@ -600,9 +600,17 @@ class TControl extends TComponent /**
* @return boolean whether viewstate is enabled
*/
- public function getEnableViewState()
+ public function getEnableViewState($checkParents=false)
{
- return !($this->_flags & self::IS_DISABLE_VIEWSTATE);
+ if($checkParents)
+ {
+ for($control=$this;$control!==null;$control=$control->getParent())
+ if($control->_flags & self::IS_DISABLE_VIEWSTATE)
+ return false;
+ return true;
+ }
+ else
+ return !($this->_flags & self::IS_DISABLE_VIEWSTATE);
}
/**
|