简体   繁体   English

SAPUI5:向导goToStep()方法不起作用

[英]SAPUI5: Wizard goToStep() method is not working

I am using SAPUI5 Wizard for my company project but it is not working for me for some reason. 我正在为公司项目使用SAPUI5向导,但是由于某种原因它对我不起作用。

Here's my code: 这是我的代码:

var allSteps = oWizardElement.getSteps();
var stepOne = allSteps[0];
var stepTwo = allSteps[1];
var stepThree = allSteps[2];
    if (iActiveStep === 1) {
        oWizardElement.goToStep(stepThree, false);
    }

After I ran the code, the entire wizard is broken. 运行代码后,整个向导被破坏了。 Including the header with step 1, steo 2, and step 3 buttons are off... When I checked the error, in the console it says 包括带有步骤1,sto 2和step 3的标题的按钮均已关闭...当我检查错误时,在控制台中显示

/webapp/resources/sap/m/library-preload.json/sap/m/WizardProgressNavigator.js:6 Uncaught TypeError: Cannot read property 'setAttribute' of undefined

Could someone please guide me what's wrong in my code? 有人可以指导我我的代码有什么问题吗?

Here's the sources I found in the SAPUI5 documentation: https://sapui5.hana.ondemand.com/docs/api/symbols/sap.m.Wizard.html#getSteps 这是我在SAPUI5文档中找到的资源: https ://sapui5.hana.ondemand.com/docs/api/symbols/sap.m.Wizard.html#getSteps

As the documentation say the step you are going to need to be activated. 正如文档所述,您将需要激活该步骤。 You should have already reached "stepThree" before otherwise gotostep() will not work. 您应该已经到达“ stepThree”,否则gotostep()将不起作用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM