summaryrefslogtreecommitdiff
path: root/framework/Web
diff options
context:
space:
mode:
authorwei <>2006-06-17 02:08:22 +0000
committerwei <>2006-06-17 02:08:22 +0000
commit649082a9eb89991189fafce8432c4fd266fac027 (patch)
treea8bcd70225eb44e61833e801810bcb5e2c17ace2 /framework/Web
parentb3ceed048bb533a00bbea542f7c12b49c8c83d9b (diff)
Fixed #237
Diffstat (limited to 'framework/Web')
-rw-r--r--framework/Web/UI/ActiveControls/TBaseActiveControl.php25
1 files changed, 20 insertions, 5 deletions
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();
}
/**