From b7f95ce37ae577e95a81e64aa2aaf3e2e698109d Mon Sep 17 00:00:00 2001 From: xue <> Date: Sat, 5 Aug 2006 21:34:30 +0000 Subject: merge from 3.0 branch till 1329. --- framework/Web/UI/WebControls/TWizard.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'framework/Web/UI/WebControls/TWizard.php') diff --git a/framework/Web/UI/WebControls/TWizard.php b/framework/Web/UI/WebControls/TWizard.php index fa0fd92a..684ef5dc 100644 --- a/framework/Web/UI/WebControls/TWizard.php +++ b/framework/Web/UI/WebControls/TWizard.php @@ -715,9 +715,11 @@ class TWizard extends TWebControl implements INamingContainer } /** + * Returns the multiview that holds the wizard steps. + * This method should only be used by control developers. * @return TMultiView the multiview holding wizard steps */ - protected function getMultiView() + public function getMultiView() { if($this->_multiView===null) { @@ -740,7 +742,6 @@ class TWizard extends TWebControl implements INamingContainer if(($wizard=$step->getWizard())!==null) $wizard->getWizardSteps()->remove($step); $step->setWizard($this); - $this->getMultiView()->getViews()->add($step); $this->wizardStepsChanged(); } @@ -752,7 +753,6 @@ class TWizard extends TWebControl implements INamingContainer */ public function removedWizardStep($step) { - $this->getMultiView()->getViews()->remove($step); $step->setWizard(null); $this->wizardStepsChanged(); } @@ -1262,7 +1262,7 @@ class TWizard extends TWebControl implements INamingContainer if($this->_sideBarDataList!==null) { $this->_sideBarDataList->setDataSource($this->getWizardSteps()); - $this->_sideBarDataList->setSelectedIndex($this->getActiveStepIndex()); + $this->_sideBarDataList->setSelectedItemIndex($this->getActiveStepIndex()); $this->_sideBarDataList->dataBind(); } } @@ -1816,6 +1816,7 @@ class TWizardStepCollection extends TList if($item instanceof TWizardStep) { parent::insertAt($index,$item); + $this->_wizard->getMultiView()->getViews()->insertAt($index,$item); $this->_wizard->addedWizardStep($item); } else @@ -1830,6 +1831,7 @@ class TWizardStepCollection extends TList public function removeAt($index) { $step=parent::removeAt($index); + $this->_wizard->getMultiView()->getViews()->remove($step); $this->_wizard->removedWizardStep($step); return $step; } -- cgit v1.2.3