summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/TListControl.php
diff options
context:
space:
mode:
authorwei <>2006-10-01 03:09:18 +0000
committerwei <>2006-10-01 03:09:18 +0000
commit36f2ce766bde98c11d57b889fd9e1a7f8dff6010 (patch)
tree87c33c9e4447e20159932824b4de6167da495d49 /framework/Web/UI/WebControls/TListControl.php
parent1c32172efb18e8d08ea483e2460813670ebfe1a5 (diff)
Fixed #350 and #148, Add TActiveRatingList, should remove TRatingList from WebControls.
Diffstat (limited to 'framework/Web/UI/WebControls/TListControl.php')
-rw-r--r--framework/Web/UI/WebControls/TListControl.php22
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');