summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorctrlaltca@gmail.com <>2011-11-15 17:33:22 +0000
committerctrlaltca@gmail.com <>2011-11-15 17:33:22 +0000
commit81fc5eee82a692b88fa6ae687ee3d33b668fd747 (patch)
tree956eb95ad953c31f3893560433420a4320142fdd
parent62b40123b4276633d491682d756a5f72199cb8a0 (diff)
dirty test patch for #372, open for comments
-rw-r--r--framework/Web/UI/ActiveControls/TActiveControlAdapter.php11
-rw-r--r--framework/Web/UI/TControl.php20
-rw-r--r--framework/Web/UI/TControlAdapter.php4
3 files changed, 20 insertions, 15 deletions
diff --git a/framework/Web/UI/ActiveControls/TActiveControlAdapter.php b/framework/Web/UI/ActiveControls/TActiveControlAdapter.php
index 99c5e71e..13f32ddb 100644
--- a/framework/Web/UI/ActiveControls/TActiveControlAdapter.php
+++ b/framework/Web/UI/ActiveControls/TActiveControlAdapter.php
@@ -90,7 +90,12 @@ class TActiveControlAdapter extends TControlAdapter
public function render($writer)
{
$this->renderCallbackClientScripts();
- parent::render($writer);
+ if($this->_control->getVisible(false))
+ {
+ parent::render($writer);
+ } else {
+ $writer->write("<span id=\"".$this->_control->getClientID()."\" ></span>");
+ }
}
/**
@@ -341,9 +346,9 @@ class TCallbackPageStateTracker
protected function updateVisible($visible)
{
if($visible === false)
- $this->client()->hide($this->_control);
+ $this->client()->replaceContent($this->_control,"<span id=\"".$this->_control->getClientID()."\" ></span>");
else
- $this->client()->show($this->_control);
+ $this->client()->replaceContent($this->_control,$this->_control);
}
/**
diff --git a/framework/Web/UI/TControl.php b/framework/Web/UI/TControl.php
index 79040dda..374c2aee 100644
--- a/framework/Web/UI/TControl.php
+++ b/framework/Web/UI/TControl.php
@@ -4,7 +4,7 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.pradosoft.com/
- * @copyright Copyright &copy; 2005-2011 PradoSoft
+ * @copyright Copyright &copy; 2005-2011 PradoSoft
* @license http://www.pradosoft.com/license/
* @version $Id$
* @package System.Web.UI
@@ -1533,7 +1533,7 @@ class TControl extends TApplicationComponent implements IRenderable, IBindable
*/
public function renderControl($writer)
{
- if($this->getVisible(false))
+ if($this instanceof IActiveControl || $this->getVisible(false))
{
if(isset($this->_rf[self::RF_ADAPTER]))
$this->_rf[self::RF_ADAPTER]->render($writer);
@@ -1997,14 +1997,14 @@ interface IValidatable
* @return mixed the value of the property to be validated.
*/
public function getValidationPropertyValue();
- /**
- * @return boolean wether this control's validators validated successfully (must default to true)
- */
- public function getIsValid();
- /**
- * @return boolean wether this control's validators validated successfully
- */
- public function setIsValid($value);
+ /**
+ * @return boolean wether this control's validators validated successfully (must default to true)
+ */
+ public function getIsValid();
+ /**
+ * @return boolean wether this control's validators validated successfully
+ */
+ public function setIsValid($value);
}
/**
diff --git a/framework/Web/UI/TControlAdapter.php b/framework/Web/UI/TControlAdapter.php
index bdf40b47..da563443 100644
--- a/framework/Web/UI/TControlAdapter.php
+++ b/framework/Web/UI/TControlAdapter.php
@@ -4,7 +4,7 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.pradosoft.com/
- * @copyright Copyright &copy; 2005-2011 PradoSoft
+ * @copyright Copyright &copy; 2005-2011 PradoSoft
* @license http://www.pradosoft.com/license/
* @version $Id$
* @package System.Web.UI
@@ -26,7 +26,7 @@ class TControlAdapter extends TApplicationComponent
/**
* @var TControl the control to which the adapter is attached
*/
- private $_control;
+ protected $_control;
/**
* Constructor.