From 649082a9eb89991189fafce8432c4fd266fac027 Mon Sep 17 00:00:00 2001 From: wei <> Date: Sat, 17 Jun 2006 02:08:22 +0000 Subject: Fixed #237 --- .../Web/UI/ActiveControls/TBaseActiveControl.php | 25 +++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'framework') diff --git a/framework/Web/UI/ActiveControls/TBaseActiveControl.php b/framework/Web/UI/ActiveControls/TBaseActiveControl.php index 71d50a67..c42f75e8 100644 --- a/framework/Web/UI/ActiveControls/TBaseActiveControl.php +++ b/framework/Web/UI/ActiveControls/TBaseActiveControl.php @@ -217,12 +217,27 @@ class TBaseActiveCallbackControl extends TBaseActiveControl */ protected function getDefaultClientSideOptions() { - if(($id=$this->getCallbackOptions())!=='' - && ($control=$this->getControl()->findControl($id))!==null - && $control instanceof TCallbackOptions) + if(($id=$this->getCallbackOptions())!=='') + { + if(($pos=strrpos($id,'.'))!==false) + { + $control=$this->getControl()->getSubProperty(substr($id,0,$pos)); + $newid=substr($id,$pos+1); + if ($control!==null) + $control=$control->findControl($newid); + } + else + { + $control=$this->getControl()->findControl($id); + } + + if($control instanceof TCallbackOptions) return $control->getClientSide()->getOptions()->toArray(); - else - return array(); + else + throw new TConfigurationException('callback_invalid_callback_options_ID', $id); + } + + return array(); } /** -- cgit v1.2.3