From 0226f8f5f430d34b3cead40c4eb7b458933d16c6 Mon Sep 17 00:00:00 2001 From: wei <> Date: Wed, 18 Jan 2006 04:20:26 +0000 Subject: update javascript library and usage in web controls --- framework/Web/UI/WebControls/TValidationSummary.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'framework/Web/UI/WebControls/TValidationSummary.php') 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); } -- cgit v1.2.3