summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorxue <>2006-02-15 23:48:22 +0000
committerxue <>2006-02-15 23:48:22 +0000
commit6fbe18466d9581b5d6097925a2fb798d397d5b0a (patch)
tree830d6e41582b45b3f9478aab74997fa8d3bdf5cc /framework
parentf2800368b052356a69c3842f04fd00bb63e59c4d (diff)
Added error messages for TListControl.
Diffstat (limited to 'framework')
-rw-r--r--framework/Exceptions/messages.txt4
-rw-r--r--framework/Web/UI/WebControls/TListControl.php6
2 files changed, 7 insertions, 3 deletions
diff --git a/framework/Exceptions/messages.txt b/framework/Exceptions/messages.txt
index d258a70d..cc1e85ef 100644
--- a/framework/Exceptions/messages.txt
+++ b/framework/Exceptions/messages.txt
@@ -151,6 +151,10 @@ emptycontrollist_addition_disallowed = Child controls are not allowed.
webcontrol_accesskey_invalid = %s.AccessKey '%s' is invalid. It must be a single character only.
webcontrol_style_invalid = %s.Style must take string value only.
+listcontrol_selection_invalid = %s has an invalid selection that is set before performing databinding.
+listcontrol_selectedindex_invalid = %s.SelectedIndex has an invalid value %d.
+listcontrol_selectedvalue_invalid = %s.SelectedValue has an invalid value '%s'.
+
label_associatedcontrol_invalid = TLabel.AssociatedControl '%s' cannot be found.
hiddenfield_focus_unsupported = THiddenField does not support setting input focus.
diff --git a/framework/Web/UI/WebControls/TListControl.php b/framework/Web/UI/WebControls/TListControl.php
index 793b266a..3c1cd547 100644
--- a/framework/Web/UI/WebControls/TListControl.php
+++ b/framework/Web/UI/WebControls/TListControl.php
@@ -404,7 +404,7 @@ abstract class TListControl extends TDataBoundControl
if($index>=0 && $index<$this->_items->getCount())
$this->_items->itemAt($index)->setSelected(true);
else if($index!==-1)
- throw new TInvalidDataValueException('listcontrol_selectedindex_invalid',$index);
+ throw new TInvalidDataValueException('listcontrol_selectedindex_invalid',get_class($this),$index);
}
$this->_cachedSelectedIndex=$index;
}
@@ -480,7 +480,7 @@ abstract class TListControl extends TDataBoundControl
$item->setSelected(true);
}
else
- throw new TInvalidDataValueException('listcontrol_selectedvalue_invalid',$value);
+ throw new TInvalidDataValueException('listcontrol_selectedvalue_invalid',get_class($this),$value);
}
$this->_cachedSelectedValue=$value;
}
@@ -609,7 +609,7 @@ class TListItemCollection extends TList
else if($item instanceof TListItem)
parent::insertAt($index,$item);
else
- throw new TInvalidDataTypeException('listitemcollection_item_invalid');
+ throw new TInvalidDataTypeException('listitemcollection_item_invalid',get_class($this));
}
/**