diff options
author | Fabio Bas <ctrlaltca@gmail.com> | 2013-11-03 19:57:22 +0100 |
---|---|---|
committer | Fabio Bas <ctrlaltca@gmail.com> | 2013-11-26 11:42:49 +0100 |
commit | 44844e9dfc4bfdac7ef33e941a09a1597fc50a32 (patch) | |
tree | 2a276ce48a505dd43a5d0415354209d70113502d | |
parent | 8f389748d555b39d139bc0852e35f2541f4e2cb5 (diff) |
Ported TCallback + demo
-rwxr-xr-x | demos/quickstart/protected/pages/ActiveControls/Samples/TCallback/Home.page | 2 | ||||
-rw-r--r-- | framework/Web/UI/ActiveControls/TBaseActiveControl.php | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TCallback/Home.page b/demos/quickstart/protected/pages/ActiveControls/Samples/TCallback/Home.page index 04781438..6be81e96 100755 --- a/demos/quickstart/protected/pages/ActiveControls/Samples/TCallback/Home.page +++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TCallback/Home.page @@ -39,7 +39,7 @@ The third parameter is taken from the textbox; {
var request = <%= $this->callback2->ActiveControl->Javascript %>;
var param2 = 'value 2';
- var param3 = $('<%= $this->txt1->ClientID %>').value;
+ var param3 = $('#<%= $this->txt1->ClientID %>').val();
request.setCallbackParameter({'Param1':param1, 'Param2':param2, 'Param3':param3});
request.dispatch();
}
diff --git a/framework/Web/UI/ActiveControls/TBaseActiveControl.php b/framework/Web/UI/ActiveControls/TBaseActiveControl.php index 61230719..f4daec02 100644 --- a/framework/Web/UI/ActiveControls/TBaseActiveControl.php +++ b/framework/Web/UI/ActiveControls/TBaseActiveControl.php @@ -332,6 +332,9 @@ class TBaseActiveCallbackControl extends TBaseActiveControl $options['CausesValidation']= $validate ? '' : false; $options['ValidationGroup']=$this->getValidationGroup(); $options['CallbackParameter'] = $this->getCallbackParameter(); + // needed for TCallback + if(!isset($options['EventTarget'])) + $options['EventTarget'] = $this->getControl()->getUniqueID(); return $options; } |