From 2c3a19d691be5e8d1e0a5e7839fc9ced549b04ee Mon Sep 17 00:00:00 2001 From: xue <> Date: Mon, 17 Apr 2006 22:12:51 +0000 Subject: Merge from 3.0 branch till 931. --- framework/Web/UI/WebControls/TWizard.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (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 794fb4da..9a2c4ce6 100644 --- a/framework/Web/UI/WebControls/TWizard.php +++ b/framework/Web/UI/WebControls/TWizard.php @@ -1077,7 +1077,7 @@ class TWizard extends TWebControl implements INamingContainer // if the button clicked causes validation which fails, // by default we will cancel navigation to the new step $button=$param->getCommandSource(); - if($button->canGetProperty('CausesValidation') && $button->getCausesValidation() && ($page=$this->getPage())!==null && !$page->getIsValid()) + if(($button instanceof IButtonControl) && $button->getCausesValidation() && ($page=$this->getPage())!==null && !$page->getIsValid()) $navParam->setCancelNavigation(true); $this->_activeStepIndexSet=false; @@ -1292,6 +1292,8 @@ class TWizard extends TWebControl implements INamingContainer $type=$this->getStepType($this->getActiveStep()); $index=$this->getActiveStepIndex(); $navParam=new TWizardNavigationEventParameter($index); + if(($sender instanceof IButtonControl) && $sender->getCausesValidation() && ($page=$this->getPage())!==null && !$page->getIsValid()) + $navParam->setCancelNavigation(true); $handled=false; $movePrev=false; -- cgit v1.2.3