summaryrefslogtreecommitdiff
path: root/framework/Web/UI/TControl.php
diff options
context:
space:
mode:
authorwei <>2006-06-24 05:46:22 +0000
committerwei <>2006-06-24 05:46:22 +0000
commita6be5564823be40670e0cad8dc758557dbd37549 (patch)
tree13083fe7ea207b5426c9ee29afc36654e1ed623d /framework/Web/UI/TControl.php
parentcb8b23aca4c682c58323f432aa38a88c7a695377 (diff)
Update active controls.
Diffstat (limited to 'framework/Web/UI/TControl.php')
-rw-r--r--framework/Web/UI/TControl.php41
1 files changed, 36 insertions, 5 deletions
diff --git a/framework/Web/UI/TControl.php b/framework/Web/UI/TControl.php
index d1767d57..34aeb85e 100644
--- a/framework/Web/UI/TControl.php
+++ b/framework/Web/UI/TControl.php
@@ -1000,20 +1000,44 @@ class TControl extends TApplicationComponent implements IRenderable, IBindable
}
/**
- * @return boolean true if the control has been initialized.
+ * @return boolean true if the child control has been initialized.
*/
- public function getIsInitialized()
+ public function getHasChildInitialized()
{
return $this->getControlStage() >= self::CS_CHILD_INITIALIZED;
}
/**
+ * @return boolean true if the onInit event has raised.
+ */
+ public function getHasInitialized()
+ {
+ return $this->getControlStage() >= self::CS_INITIALIZED;
+ }
+
+ /**
* @return boolean true if the control has loaded post data.
*/
public function getHasLoadedPostData()
{
+ return $this->getControlStage() >= self::CS_STATE_LOADED;
+ }
+
+ /**
+ * @return boolean true if the onLoad event has raised.
+ */
+ public function getHasLoaded()
+ {
return $this->getControlStage() >= self::CS_LOADED;
}
+
+ /**
+ * @return boolean true if onPreRender event has raised.
+ */
+ public function getHasPreRendered()
+ {
+ return $this->getControlStage() >= self::CS_PRERENDERED;
+ }
/**
* Returns the named registered object.
@@ -1250,12 +1274,19 @@ class TControl extends TApplicationComponent implements IRenderable, IBindable
$control->evaluateDynamicContent();
}
}
-
- if($this instanceof IPostBackDataHandler)
- $this->getPage()->registerPostDataLoader($this);
+ $this->addToPostDataLoader();
}
$this->_stage=self::CS_PRERENDERED;
}
+
+ /**
+ * Add controls implementing IPostBackDataHandler to post data loaders.
+ */
+ protected function addToPostDataLoader()
+ {
+ if($this instanceof IPostBackDataHandler)
+ $this->getPage()->registerPostDataLoader($this);
+ }
/**
* Performs the Unload step for the control and all its child controls.