summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/TValidationSummary.php
diff options
context:
space:
mode:
authorwei <>2006-01-18 04:20:26 +0000
committerwei <>2006-01-18 04:20:26 +0000
commit0226f8f5f430d34b3cead40c4eb7b458933d16c6 (patch)
tree68b21c4bec09ed73edc64019b4e20a2e3853d477 /framework/Web/UI/WebControls/TValidationSummary.php
parente2219c91b98088289080bfa451d3083851eddf76 (diff)
update javascript library and usage in web controls
Diffstat (limited to 'framework/Web/UI/WebControls/TValidationSummary.php')
-rw-r--r--framework/Web/UI/WebControls/TValidationSummary.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/framework/Web/UI/WebControls/TValidationSummary.php b/framework/Web/UI/WebControls/TValidationSummary.php
index 14cf869d..0ac7584a 100644
--- a/framework/Web/UI/WebControls/TValidationSummary.php
+++ b/framework/Web/UI/WebControls/TValidationSummary.php
@@ -213,6 +213,12 @@ class TValidationSummary extends TWebControl
return $validators;
}
+ protected function addAttributesToRender($writer)
+ {
+ $writer->addAttribute('id',$this->getClientID());
+ parent::addAttributesToRender($writer);
+ }
+
/**
* Render the javascript for validation summary.
* @param array list of options for validation summary.
@@ -221,7 +227,8 @@ class TValidationSummary extends TWebControl
{
if(!$this->getEnabled(true) || !$this->getEnableClientScript())
return;
- $options = TJavascript::toList($this->getClientScriptOptions());
+ $serializer = new TJavascriptSerializer($this->getClientScriptOptions());
+ $options = $serializer->toJavascript();
$script = "new Prado.Validation.Summary({$options});";
$this->getPage()->getClientScript()->registerEndScript($this->getClientID(), $script);
}