public function dataListItemCommand($sender, $param)
{
$item = $param->getItem();
if ($param->getCommandName() === self::CMD_MOVETO) {
$stepIndex = $this->getActiveStepIndex();
$newStepIndex = TPropertyValue::ensureInteger($param->getCommandParameter());
$navParam = new TWizardNavigationEventParameter($stepIndex);
$navParam->setNextStepIndex($newStepIndex);
// if the button clicked causes validation which fails,
// by default we will cancel navigation to the new step
$button = $param->getCommandSource();
if ($button instanceof \Prado\Web\UI\IButtonControl && $button->getCausesValidation() && ($page = $this->getPage()) !== null && !$page->getIsValid()) {
$navParam->setCancelNavigation(true);
}
$this->_activeStepIndexSet = false;
$this->onSideBarButtonClick($navParam);
$this->_cancelNavigation = $navParam->getCancelNavigation();
if (!$this->_cancelNavigation) {
if (!$this->_activeStepIndexSet && $this->allowNavigationToStep($newStepIndex)) {
$this->setActiveStepIndex($newStepIndex);
}
} else {
$this->setActiveStepIndex($stepIndex);
}
}
}