From f21d3433721308f5d0693f44bbfed56f7b2ecc2d Mon Sep 17 00:00:00 2001 From: wei <> Date: Fri, 5 May 2006 00:45:35 +0000 Subject: Adding TActiveLabel --- framework/Web/UI/TPage.php | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) (limited to 'framework/Web/UI/TPage.php') diff --git a/framework/Web/UI/TPage.php b/framework/Web/UI/TPage.php index 94f1f475..11ebc1dd 100644 --- a/framework/Web/UI/TPage.php +++ b/framework/Web/UI/TPage.php @@ -37,7 +37,7 @@ class TPage extends TTemplateControl const FIELD_PAGESTATE='PRADO_PAGESTATE'; const FIELD_CALLBACK_TARGET='PRADO_CALLBACK_TARGET'; const FIELD_CALLBACK_PARAMETER='PRADO_CALLBACK_PARAMETER'; -// const FIELD_CALLBACK_ID='PRADO_CALLBACK_ID'; + /** * @var array system post fields */ @@ -48,7 +48,6 @@ class TPage extends TTemplateControl 'PRADO_PAGESTATE'=>true, 'PRADO_CALLBACK_TARGET'=>true, 'PRADO_CALLBACK_PARAMETER'=>true - //'PRADO_CALLBACK_ID'=>true ); /** * @var TForm form instance @@ -154,6 +153,11 @@ class TPage extends TTemplateControl * @var array post data loader IDs. */ private $_postDataLoaders=array(); + /** + * @var boolean true if callback request is allowed to update the client- + * side contents during callback response. + */ + private $_allowCallbackUpdate=false; /** * Constructor. @@ -278,6 +282,8 @@ class TPage extends TTemplateControl Prado::trace("Page initRecursive()",'System.Web.UI.TPage'); $this->initRecursive(); + $this->setAllowCallbackUpdate(true); + Prado::trace("Page onInitComplete()",'System.Web.UI.TPage'); $this->onInitComplete(null); @@ -295,6 +301,7 @@ class TPage extends TTemplateControl Prado::trace("Page raiseChangedEvents()",'System.Web.UI.TPage'); $this->raiseChangedEvents(); + $this->getAdapter()->processCallbackEvent($writer); /* @@ -323,6 +330,28 @@ class TPage extends TTemplateControl $this->unloadRecursive(); } + /** + * Returns true if callback request is allowed to update the client- side + * contents during callback response. Default is true if {@link + * getIsCallback IsCallback} is true and onInit stage has been completed. + * @return boolean true to allow client-side update. + */ + public function getAllowCallbackUpdate() + { + return $this->_allowCallbackUpdate; + } + + /** + * Set to true to allow callback request to update client-side content + * during callback response. Default is true if {@link getIsCallback + * IsCallback} is true and onInit stage has been completed. + * @param boolean true to allow callback to update client-side content. + */ + public function setAllowCallbackUpdate($value) + { + $this->_allowCallbackUpdate = TPropertyValue::ensureBoolean($value); + } + /** * Gets the callback client script handler that allows javascript functions * to be executed during the callback response. -- cgit v1.2.3