summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/TCheckBoxList.php
diff options
context:
space:
mode:
authorwei <>2006-04-25 01:00:08 +0000
committerwei <>2006-04-25 01:00:08 +0000
commitc84f3e19b54cf54f525f4b2d158696ae32d1bf60 (patch)
tree60720fba29ef72175db47dd3cd4b74d8bbed605b /framework/Web/UI/WebControls/TCheckBoxList.php
parent09edc6590523e26fffbf32f7b0e7958c166f7537 (diff)
Add TListControlValidator. Update client-side validators, datepicker.js, colorpicker.js.
Diffstat (limited to 'framework/Web/UI/WebControls/TCheckBoxList.php')
-rw-r--r--framework/Web/UI/WebControls/TCheckBoxList.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/framework/Web/UI/WebControls/TCheckBoxList.php b/framework/Web/UI/WebControls/TCheckBoxList.php
index 8a106b46..de332897 100644
--- a/framework/Web/UI/WebControls/TCheckBoxList.php
+++ b/framework/Web/UI/WebControls/TCheckBoxList.php
@@ -47,7 +47,7 @@ Prado::using('System.Web.UI.WebControls.TCheckBox');
* @package System.Web.UI.WebControls
* @since 3.0
*/
-class TCheckBoxList extends TListControl implements IRepeatInfoUser, INamingContainer, IPostBackDataHandler
+class TCheckBoxList extends TListControl implements IRepeatInfoUser, INamingContainer, IPostBackDataHandler, IValidatable
{
private $_repeatedControl;
private $_isEnabled;
@@ -309,7 +309,7 @@ class TCheckBoxList extends TListControl implements IRepeatInfoUser, INamingCont
if($item->getEnabled())
{
$checked=isset($values[$key]);
- if($item->getSelected()!=$checked)
+ if($item->getSelected()!==$checked)
{
$item->setSelected($checked);
if(!$this->_changedEventRaised)
@@ -381,6 +381,16 @@ class TCheckBoxList extends TListControl implements IRepeatInfoUser, INamingCont
$this->setTabIndex($tabIndex);
}
}
+
+ /**
+ * Returns the value to be validated.
+ * This methid is required by IValidatable interface.
+ * @return mixed the value of the property to be validated.
+ */
+ public function getValidationPropertyValue()
+ {
+ return $this->getSelectedValue();
+ }
}
?> \ No newline at end of file