summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY4
-rw-r--r--framework/Web/UI/WebControls/TWizard.php17
2 files changed, 16 insertions, 5 deletions
diff --git a/HISTORY b/HISTORY
index cb97f4b5..f9520c0f 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1,3 +1,7 @@
+Version 3.0.7
+===================
+BUG: Ticket#481 - Unable to cancel navigation when handling OnSideBarButtonClickEvent (Qiang)
+
Version 3.0.6 December 4, 2006
==============================
BUG: Ticket#400 - TJavascriptLogger incompatible with Firefox 2.0 RC1 (Wei)
diff --git a/framework/Web/UI/WebControls/TWizard.php b/framework/Web/UI/WebControls/TWizard.php
index 002c49a8..9f959eaa 100644
--- a/framework/Web/UI/WebControls/TWizard.php
+++ b/framework/Web/UI/WebControls/TWizard.php
@@ -173,6 +173,10 @@ class TWizard extends TWebControl implements INamingContainer
* @var TDataList side bar data list.
*/
private $_sideBarDataList;
+ /**
+ * @var boolean whether navigation should be cancelled (a status set in OnSideBarButtonClick)
+ */
+ private $_cancelNavigation=false;
/**
* @return string tag name for the wizard
@@ -675,7 +679,7 @@ class TWizard extends TWebControl implements INamingContainer
* Raises <b>OnCompleteButtonClick</b> event.
* This event is raised when a finish navigation button is clicked in the
* current active step.
- * @param TEventParameter event parameter
+ * @param TWizardNavigationEventParameter event parameter
*/
public function onCompleteButtonClick($param)
{
@@ -688,7 +692,7 @@ class TWizard extends TWebControl implements INamingContainer
* Raises <b>OnNextButtonClick</b> event.
* This event is raised when a next navigation button is clicked in the
* current active step.
- * @param TEventParameter event parameter
+ * @param TWizardNavigationEventParameter event parameter
*/
public function onNextButtonClick($param)
{
@@ -699,7 +703,7 @@ class TWizard extends TWebControl implements INamingContainer
* Raises <b>OnPreviousButtonClick</b> event.
* This event is raised when a previous navigation button is clicked in the
* current active step.
- * @param TEventParameter event parameter
+ * @param TWizardNavigationEventParameter event parameter
*/
public function onPreviousButtonClick($param)
{
@@ -709,7 +713,7 @@ class TWizard extends TWebControl implements INamingContainer
/**
* Raises <b>OnSideBarButtonClick</b> event.
* This event is raised when a link button in the side bar is clicked.
- * @param TEventParameter event parameter
+ * @param TWizardNavigationEventParameter event parameter
*/
public function onSideBarButtonClick($param)
{
@@ -1137,7 +1141,8 @@ class TWizard extends TWebControl implements INamingContainer
$this->_activeStepIndexSet=false;
$this->onSideBarButtonClick($navParam);
- if(!$navParam->getCancelNavigation())
+ $this->_cancelNavigation=$navParam->getCancelNavigation();
+ if(!$this->_cancelNavigation)
{
if(!$this->_activeStepIndexSet && $this->allowNavigationToStep($newStepIndex))
$this->setActiveStepIndex($newStepIndex);
@@ -1385,6 +1390,8 @@ class TWizard extends TWebControl implements INamingContainer
}
else if(strcasecmp($command,self::CMD_MOVETO)===0)
{
+ if($this->_cancelNavigation) // may be set in onSideBarButtonClick
+ $navParam->setCancelNavigation(true);
$navParam->setNextStepIndex(TPropertyValue::ensureInteger($param->getCommandParameter()));
$handled=true;
}