summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxue <>2006-06-08 23:56:38 +0000
committerxue <>2006-06-08 23:56:38 +0000
commit99458807b73ff35b07521697f806b4654d1ec8fd (patch)
tree34533823505feb2010c64f72dfdcebe4c7be6c44
parent97991dea453f103aba63ab1a1818e434c93c1ee8 (diff)
ensureChildControls() is now invoked in TControl::initRecursive
-rw-r--r--HISTORY1
-rw-r--r--framework/Web/UI/TControl.php2
-rw-r--r--tests/FunctionalTests/quickstart/Controls/Wizard1TestCase.php2
-rw-r--r--tests/FunctionalTests/quickstart/Controls/Wizard2TestCase.php2
-rw-r--r--tests/FunctionalTests/quickstart/Controls/Wizard3TestCase.php10
-rw-r--r--tests/FunctionalTests/quickstart/Controls/Wizard5TestCase.php6
6 files changed, 12 insertions, 11 deletions
diff --git a/HISTORY b/HISTORY
index 14b3a6d4..cf254dbb 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1,6 +1,7 @@
Version 3.0.2 July 2, 2006
==========================
BUG: Ticket#213 - PRADO Requirements Checker charset error (Qiang)
+CHG: ensureChildControls() is now invoked in TControl::initRecursive (Qiang)
Version 3.0.1 June 4, 2006
==========================
diff --git a/framework/Web/UI/TControl.php b/framework/Web/UI/TControl.php
index 21065ae6..583b5f77 100644
--- a/framework/Web/UI/TControl.php
+++ b/framework/Web/UI/TControl.php
@@ -1147,6 +1147,7 @@ class TControl extends TApplicationComponent implements IRenderable, IBindable
*/
protected function initRecursive($namingContainer=null)
{
+ $this->ensureChildControls();
if($this->getHasControls())
{
if($this instanceof INamingContainer)
@@ -1217,7 +1218,6 @@ class TControl extends TApplicationComponent implements IRenderable, IBindable
if($this->getVisible(false))
{
- $this->ensureChildControls();
if(isset($this->_rf[self::RF_ADAPTER]))
$this->_rf[self::RF_ADAPTER]->onPreRender(null);
else
diff --git a/tests/FunctionalTests/quickstart/Controls/Wizard1TestCase.php b/tests/FunctionalTests/quickstart/Controls/Wizard1TestCase.php
index ea071612..8b2da6f3 100644
--- a/tests/FunctionalTests/quickstart/Controls/Wizard1TestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/Wizard1TestCase.php
@@ -14,7 +14,7 @@ class Wizard1TestCase extends SeleniumTestCase
$this->verifyVisible('ctl0_body_Wizard1_SideBarList_ctl0_SideBarButton');
$this->verifyAttribute('ctl0_body_Wizard1_SideBarList_ctl1_SideBarButton@disabled','regexp:true|disabled');
$this->select('ctl0$body$Wizard1$DropDownList1', "label=Purple");
- $this->clickAndWait('ctl0$body$Wizard1$ctl8$ctl1');
+ $this->clickAndWait('ctl0$body$Wizard1$ctl6$ctl1');
// step 2
$this->verifyTextPresent('Your favorite color is: Purple');
diff --git a/tests/FunctionalTests/quickstart/Controls/Wizard2TestCase.php b/tests/FunctionalTests/quickstart/Controls/Wizard2TestCase.php
index ca94bb19..04d448cb 100644
--- a/tests/FunctionalTests/quickstart/Controls/Wizard2TestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/Wizard2TestCase.php
@@ -14,7 +14,7 @@ class Wizard2TestCase extends SeleniumTestCase
$this->verifyVisible('ctl0_body_Wizard1_SideBarList_ctl0_SideBarButton');
$this->verifyAttribute('ctl0_body_Wizard1_SideBarList_ctl1_SideBarButton@disabled','regexp:true|disabled');
$this->select('ctl0$body$Wizard1$DropDownList1', "label=Blue");
- $this->clickAndWait('ctl0$body$Wizard1$ctl8$ctl1');
+ $this->clickAndWait('ctl0$body$Wizard1$ctl6$ctl1');
// step 2
$this->verifyTextPresent('Your favorite color is: Blue');
diff --git a/tests/FunctionalTests/quickstart/Controls/Wizard3TestCase.php b/tests/FunctionalTests/quickstart/Controls/Wizard3TestCase.php
index 807e7dc6..855ed545 100644
--- a/tests/FunctionalTests/quickstart/Controls/Wizard3TestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/Wizard3TestCase.php
@@ -12,15 +12,15 @@ class Wizard3TestCase extends SeleniumTestCase
$this->verifyTextPresent('A Mini Survey');
$this->verifyTextPresent('PRADO QuickStart Sample');
$this->click('ctl0_body_Wizard3_StudentCheckBox');
- $this->clickAndWait('ctl0$body$Wizard3$ctl8$ctl0');
+ $this->clickAndWait('ctl0$body$Wizard3$ctl4$ctl0');
// step 2
$this->select('ctl0$body$Wizard3$DropDownList11', "label=Chemistry");
- $this->clickAndWait('ctl0$body$Wizard3$ctl9$ctl1');
+ $this->clickAndWait('ctl0$body$Wizard3$ctl5$ctl1');
// step 3
$this->select('ctl0$body$Wizard3$DropDownList22', "label=Tennis");
- $this->clickAndWait('ctl0$body$Wizard3$ctl10$ctl1');
+ $this->clickAndWait('ctl0$body$Wizard3$ctl6$ctl1');
// step 4
$this->verifyTextPresent('You are a college student');
@@ -31,11 +31,11 @@ class Wizard3TestCase extends SeleniumTestCase
$this->open("../../demos/quickstart/index.php?page=Controls.Samples.TWizard.Sample3&amp;notheme=true", "");
// step 1
- $this->clickAndWait('ctl0$body$Wizard3$ctl8$ctl0');
+ $this->clickAndWait('ctl0$body$Wizard3$ctl4$ctl0');
// step 3
$this->select('ctl0$body$Wizard3$DropDownList22', "label=Baseball");
- $this->clickAndWait('ctl0$body$Wizard3$ctl10$ctl1');
+ $this->clickAndWait('ctl0$body$Wizard3$ctl6$ctl1');
// step 4
$this->verifyTextNotPresent('You are a college student');
diff --git a/tests/FunctionalTests/quickstart/Controls/Wizard5TestCase.php b/tests/FunctionalTests/quickstart/Controls/Wizard5TestCase.php
index e25ce86d..b1df9213 100644
--- a/tests/FunctionalTests/quickstart/Controls/Wizard5TestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/Wizard5TestCase.php
@@ -14,11 +14,11 @@ class Wizard5TestCase extends SeleniumTestCase
$this->verifyVisible('ctl0_body_Wizard1_SideBarList_ctl1_SideBarButton');
$this->verifyAttribute('ctl0_body_Wizard1_SideBarList_ctl2_SideBarButton@disabled','regexp:true|disabled');
$this->select('ctl0_body_Wizard1_DropDownList1', "label=Cyan");
- $this->clickAndWait('ctl0$body$Wizard1$ctl6$ctl0');
+ $this->clickAndWait('ctl0$body$Wizard1$ctl4$ctl0');
// step 2
$this->select('ctl0_body_Wizard1_Step2_DropDownList2','label=Football');
- $this->clickAndWait('ctl0$body$Wizard1$ctl8$ctl0');
+ $this->clickAndWait('ctl0$body$Wizard1$ctl6$ctl0');
// step 1
$this->verifySelected('ctl0_body_Wizard1_DropDownList1','label=Cyan');
@@ -26,7 +26,7 @@ class Wizard5TestCase extends SeleniumTestCase
// step 2
$this->verifySelected('ctl0_body_Wizard1_Step2_DropDownList2','label=Football');
- $this->clickAndWait('ctl0$body$Wizard1$ctl8$ctl1');
+ $this->clickAndWait('ctl0$body$Wizard1$ctl6$ctl1');
// step 3
$this->verifyTextPresent('Your favorite color is: Cyan');