From d255f4d0e332740b3984e21ce3f7a4a4f1968ba3 Mon Sep 17 00:00:00 2001 From: wei <> Date: Tue, 2 May 2006 08:28:17 +0000 Subject: Adding more work on ActiveControls. --- framework/Web/UI/ActiveControls/TActiveControl.php | 28 +++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'framework/Web/UI/ActiveControls/TActiveControl.php') diff --git a/framework/Web/UI/ActiveControls/TActiveControl.php b/framework/Web/UI/ActiveControls/TActiveControl.php index d289bab9..e61682d3 100644 --- a/framework/Web/UI/ActiveControls/TActiveControl.php +++ b/framework/Web/UI/ActiveControls/TActiveControl.php @@ -6,17 +6,43 @@ class TActiveControl extends TControl implements ICallbackEventHandler, IActiveControl { + private $_clientSide; + public function __construct() { parent::__construct(); $this->setAdapter(new TActiveControlAdapter($this)); } + + public function getClientSide() + { + if(is_null($this->_clientSide)) + $this->_clientSide = $this->createClientSideOptions(); + return $this->_clientSide; + } + + protected function createClientSideOptions() + { + $client = new TCallbackClientSideOptions; + return $client; + } public function raiseCallbackEvent($param) { - var_dump($param); + var_dump($param->getParameter()); + $param->Output->write($param->Parameter); $client = $this->getPage()->getCallbackClient(); $client->hide($this); + $client->toggle($this); + $client->update($this, 1); + $param->setData(array("asdasdad",1)); + } + + public function getCallbackReference() + { + // $formID = $this->getPage()->getForm()->getClientID(); + // $this->getClientSide()->setValidationForm($formID); + return $this->getPage()->getClientScript()->getCallbackReference($this); } } -- cgit v1.2.3