diff options
author | xue <> | 2006-05-04 02:36:22 +0000 |
---|---|---|
committer | xue <> | 2006-05-04 02:36:22 +0000 |
commit | a14913019919d7b6c2d13769b151a645b5226e02 (patch) | |
tree | 6a52d262a2d400cf1097ddc23e912d7e32f8715d /framework/Web/UI/WebControls/TWizard.php | |
parent | 57284b8cfbd15a04d8a23f324e76f694d6bd3dfe (diff) |
Fixed an issue about instantiating a template: direct child controls are added to page hierarchy at the last.
Diffstat (limited to 'framework/Web/UI/WebControls/TWizard.php')
-rw-r--r-- | framework/Web/UI/WebControls/TWizard.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/framework/Web/UI/WebControls/TWizard.php b/framework/Web/UI/WebControls/TWizard.php index 3af09a95..fb0c941d 100644 --- a/framework/Web/UI/WebControls/TWizard.php +++ b/framework/Web/UI/WebControls/TWizard.php @@ -894,8 +894,13 @@ class TWizard extends TWebControl implements INamingContainer $activeStep=$this->getActiveStep();
$activeStepIndex=$this->getActiveStepIndex();
- if(!$this->_navigation || $activeStepIndex<0 || $activeStepIndex>=$wizardSteps->getCount())
+ if(!$this->_navigation)
return;
+ else if($activeStepIndex<0 || $activeStepIndex>=$wizardSteps->getCount())
+ {
+ $this->_navigation->setVisible(false);
+ return;
+ }
// set visibility of different types of navigation panel
$showStandard=true;
@@ -1184,7 +1189,8 @@ class TWizard extends TWebControl implements INamingContainer $this->_stepContent=new TPanel;
$this->_stepContent->getControls()->add($multiView);
$this->getControls()->add($this->_stepContent);
- $multiView->setActiveViewIndex(0);
+ if($multiView->getViews()->getCount())
+ $multiView->setActiveViewIndex(0);
}
/**
|