summaryrefslogtreecommitdiff
path: root/framework/Web/UI/ActiveControls/TActiveFileUpload.php
diff options
context:
space:
mode:
authorChristophe.Boulain <>2009-04-14 11:27:19 +0000
committerChristophe.Boulain <>2009-04-14 11:27:19 +0000
commit37cd9aec35acd0cd03946fc6f26d7fe02c3c5d48 (patch)
treeac7ebf698fedfc5b0553b097ed8bf2d74dce1a0e /framework/Web/UI/ActiveControls/TActiveFileUpload.php
parentca080e5dc8ff461f63f2e22e83a3b3898642c5ba (diff)
Fixed Issue#135 - Add AutoPostBack property to TActiveFileUpload
Diffstat (limited to 'framework/Web/UI/ActiveControls/TActiveFileUpload.php')
-rwxr-xr-xframework/Web/UI/ActiveControls/TActiveFileUpload.php28
1 files changed, 26 insertions, 2 deletions
diff --git a/framework/Web/UI/ActiveControls/TActiveFileUpload.php b/framework/Web/UI/ActiveControls/TActiveFileUpload.php
index a0a066f7..b935936b 100755
--- a/framework/Web/UI/ActiveControls/TActiveFileUpload.php
+++ b/framework/Web/UI/ActiveControls/TActiveFileUpload.php
@@ -133,7 +133,30 @@ EOS;
* default "Application.runtime.*"
*/
public function setTempPath($value){
- $this->setViewState('TempNamespace',$value,'Application.runtime.*');
+ $this->setViewState('TempPath',$value,'Application.runtime.*');
+ }
+
+ /**
+ * @return boolean a value indicating whether an automatic callback to the server will occur whenever the user modifies the text in the TTextBox control and then tabs out of the component. Defaults to true.
+ * Note: When set to false, you will need to trigger the callback yourself.
+ */
+ public function getAutoPostBack(){
+ return $this->getViewState('AutoPostBack', true);
+ }
+
+ /**
+ * @param boolean a value indicating whether an automatic callback to the server will occur whenever the user modifies the text in the TTextBox control and then tabs out of the component. Defaults to true.
+ * Note: When set to false, you will need to trigger the callback yourself.
+ */
+ public function setAutoPostBack($value){
+ $this->setViewState('AutoPostBack',TPropertyValue::ensureBoolean($value),true);
+ }
+
+ /**
+ * @return string A chuck of javascript that will need to be called if {{@link getAutoPostBack AutoPostBack} is set to false}
+ */
+ public function getCallbackJavascript(){
+ return "Prado.WebUI.TActiveFileUpload.fileChanged(\"{$this->getClientID()}\")";
}
/**
@@ -267,6 +290,7 @@ EOS;
$options['indicatorID'] = $this->_busy->getClientID();
$options['completeID'] = $this->_success->getClientID();
$options['errorID'] = $this->_error->getClientID();
+ $options['autoPostBack'] = $this->getAutoPostBack();
return $options;
}
@@ -313,4 +337,4 @@ EOS;
$this->ensureChildControls();
return $this->_busy;
}
-} \ No newline at end of file
+}