summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Bas <ctrlaltca@gmail.com>2014-02-27 22:58:28 +0100
committerFabio Bas <ctrlaltca@gmail.com>2014-02-27 22:58:28 +0100
commitd21f0991c5920ae8432ba4ad561f843bec718d9c (patch)
tree46f8a0e19886bbe16214409f3fc71fe6c17b2e7c
parenta0d6864093cf13a96dafa8a47b5c43891b2b864f (diff)
TRatingList: try harder to find the Caption control
TRatingList uses a loose method to find its caption control, searching it by id within the page. If the element is not found in the page, try to find it inside the TRatingList’s NamingContainer
-rw-r--r--framework/Web/UI/WebControls/TRatingList.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/framework/Web/UI/WebControls/TRatingList.php b/framework/Web/UI/WebControls/TRatingList.php
index c48b3cdb..b1673ac0 100644
--- a/framework/Web/UI/WebControls/TRatingList.php
+++ b/framework/Web/UI/WebControls/TRatingList.php
@@ -175,6 +175,8 @@ class TRatingList extends TRadioButtonList
{
if($control=$this->getPage()->findControl($id))
return $control;
+ if($control=$this->getNamingContainer()->findControl($id))
+ return $control;
}
throw new TInvalidDataValueException(
'ratinglist_invalid_caption_id',$id,$this->getID());