summaryrefslogtreecommitdiff
path: root/framework/Web/UI/ActiveControls
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web/UI/ActiveControls')
-rw-r--r--framework/Web/UI/ActiveControls/TActiveDropDownList.php17
-rw-r--r--framework/Web/UI/ActiveControls/TActiveListBox.php16
-rw-r--r--framework/Web/UI/ActiveControls/TActiveTextBox.php25
-rw-r--r--framework/Web/UI/ActiveControls/TBaseActiveControl.php4
-rw-r--r--framework/Web/UI/ActiveControls/TInPlaceTextBox.php22
5 files changed, 3 insertions, 81 deletions
diff --git a/framework/Web/UI/ActiveControls/TActiveDropDownList.php b/framework/Web/UI/ActiveControls/TActiveDropDownList.php
index 0a6a3832..302b0afa 100644
--- a/framework/Web/UI/ActiveControls/TActiveDropDownList.php
+++ b/framework/Web/UI/ActiveControls/TActiveDropDownList.php
@@ -67,23 +67,6 @@ class TActiveDropDownList extends TDropDownList implements ICallbackEventHandler
}
/**
- * Loads user input data.
- * Disables ActiveControl.EnableUpdate subproperty during loading post data
- * to avoid duplicating selection changes.
- * @param string the key that can be used to retrieve data from the input data collection
- * @param array the input data collection
- * @return boolean whether the data of the component has been changed
- */
- public function loadPostData($key,$values)
- {
- $enabled = $this->getActiveControl()->getEnableUpdate();
- $this->getActiveControl()->setEnableUpdate(false);
- $result = parent::loadPostData($key, $values);
- $this->getActiveControl()->setEnableUpdate($enabled);
- return $result;
- }
-
- /**
* Creates a collection object to hold list items. A specialized
* TActiveListItemCollection is created to allow the drop down list options
* to be added.
diff --git a/framework/Web/UI/ActiveControls/TActiveListBox.php b/framework/Web/UI/ActiveControls/TActiveListBox.php
index 30eeba2c..cb982be2 100644
--- a/framework/Web/UI/ActiveControls/TActiveListBox.php
+++ b/framework/Web/UI/ActiveControls/TActiveListBox.php
@@ -51,22 +51,6 @@ class TActiveListBox extends TListBox implements IActiveControl, ICallbackEventH
}
/**
- * Loads user input data. Disables the client-side update during loading
- * and restore the EnableUpdate of ActiveControl after loading.
- * @param string the key that can be used to retrieve data from the input data collection
- * @param array the input data collection
- * @return boolean whether the data of the component has been changed
- */
- public function loadPostData($key,$values)
- {
- $enabled = $this->getActiveControl()->getEnableUpdate();
- $this->getActiveControl()->setEnableUpdate(false);
- $result = parent::loadPostData($key, $values);
- $this->getActiveControl()->setEnableUpdate($enabled);
- return $result;
- }
-
- /**
* Sets the selection mode of the list control (Single, Multiple)
* on the client-side if the {@link setEnableUpdate EnableUpdate}
* property is set to true.
diff --git a/framework/Web/UI/ActiveControls/TActiveTextBox.php b/framework/Web/UI/ActiveControls/TActiveTextBox.php
index c5f0f152..20358a36 100644
--- a/framework/Web/UI/ActiveControls/TActiveTextBox.php
+++ b/framework/Web/UI/ActiveControls/TActiveTextBox.php
@@ -85,31 +85,6 @@ class TActiveTextBox extends TTextBox implements ICallbackEventHandler, IActiveC
}
/**
- * Loads user input data.
- * This method is primarly used by framework developers.
- * @param string the key that can be used to retrieve data from the input data collection
- * @param array the input data collection
- * @return boolean whether the data of the component has been changed
- */
- public function loadPostData($key,$values)
- {
- $value=$values[$key];
- if($this->getAutoTrim())
- $value=trim($value);
- if(!$this->getReadOnly() && $this->getText()!==$value)
- {
- $enabled = $this->getActiveControl()->getEnableUpdate();
- $this->getActiveControl()->setEnableUpdate(false);
- $this->setText($value);
- $this->getActiveControl()->setEnableUpdate($enabled);
- return true;
- }
- else
- return false;
- }
-
-
- /**
* Renders the javascript for textbox.
*/
protected function renderClientControlScript($writer)
diff --git a/framework/Web/UI/ActiveControls/TBaseActiveControl.php b/framework/Web/UI/ActiveControls/TBaseActiveControl.php
index e5fe8f16..ed2e50db 100644
--- a/framework/Web/UI/ActiveControls/TBaseActiveControl.php
+++ b/framework/Web/UI/ActiveControls/TBaseActiveControl.php
@@ -119,13 +119,15 @@ class TBaseActiveControl extends TComponent
/**
* Returns true if callback response is allowed to update the browser contents.
* Is is true if the control is initilized, and is a callback request and
- * the {@link setEnableUpdate EnabledUpdate} property is true.
+ * the {@link setEnableUpdate EnabledUpdate} property is true and
+ * the page is not loading post data.
* @return boolean true if the callback response is allowed update
* client-side contents.
*/
public function canUpdateClientSide()
{
return $this->getControl()->getHasChildInitialized()
+ && $this->getPage()->getIsLoadingPostData() == false
&& $this->getPage()->getIsCallback()
&& $this->getEnableUpdate();
}
diff --git a/framework/Web/UI/ActiveControls/TInPlaceTextBox.php b/framework/Web/UI/ActiveControls/TInPlaceTextBox.php
index b783be88..b131da24 100644
--- a/framework/Web/UI/ActiveControls/TInPlaceTextBox.php
+++ b/framework/Web/UI/ActiveControls/TInPlaceTextBox.php
@@ -190,28 +190,6 @@ class TInPlaceTextBox extends TLabel implements
$this->setViewState('ValidationGroup',$value,'');
}
- /**
- * Loads user input data.
- * This method is primarly used by framework developers.
- * @param string the key that can be used to retrieve data from the input data collection
- * @param array the input data collection
- * @return boolean whether the data of the component has been changed
- */
- public function loadPostData($key,$values)
- {
- $value=$values[$key];
- if($this->getText()!==$value)
- {
- $enabled = $this->getActiveControl()->getEnableUpdate();
- $this->getActiveControl()->setEnableUpdate(false);
- $this->setText($value);
- $this->getActiveControl()->setEnableUpdate($enabled);
- return true;
- }
- else
- return false;
- }
-
public function raisePostDataChangedEvent()
{
$this->onTextChanged(null);