diff options
Diffstat (limited to 'framework/Web/UI/WebControls/TListControl.php')
-rw-r--r-- | framework/Web/UI/WebControls/TListControl.php | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/framework/Web/UI/WebControls/TListControl.php b/framework/Web/UI/WebControls/TListControl.php index 7576154e..056a8548 100644 --- a/framework/Web/UI/WebControls/TListControl.php +++ b/framework/Web/UI/WebControls/TListControl.php @@ -106,6 +106,22 @@ abstract class TListControl extends TDataBoundControl }
/**
+ * @return boolean whether to render javascript.
+ */
+ public function getEnableClientScript()
+ {
+ return $this->getViewState('EnableClientScript',true);
+ }
+
+ /**
+ * @param boolean whether to render javascript.
+ */
+ public function setEnableClientScript($value)
+ {
+ $this->setViewState('EnableClientScript',TPropertyValue::ensureBoolean($value),true);
+ }
+
+ /**
* Adds attributes to renderer.
* @param THtmlWriter the renderer
*/
@@ -117,8 +133,12 @@ abstract class TListControl extends TDataBoundControl $writer->addAttribute('multiple','multiple');
if($this->getEnabled(true))
{
- if($this->getAutoPostBack() && $page->getClientSupportsJavaScript())
+ if($this->getAutoPostBack()
+ && $this->getEnableClientScript()
+ && $page->getClientSupportsJavaScript())
+ {
$this->renderClientControlScript($writer);
+ }
}
else if($this->getEnabled())
$writer->addAttribute('disabled','disabled');
|