question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Wizard discardProgress

See original GitHub issue

Hi,

On MacOSX 10.11 bèta (15A278b) safari emulating IE 10 As well as on Windows with IE11 (On Chrome it works 100% of the time)

The function discardProgress of sap.m.Wizard is not working correctly

    this._wizard.discardProgress(this.getView().byId("wiz1"));
    this.getView().byId("SettingsWizard").discardProgress(this.getView().byId("wiz1"));

This is throwing an error on _getStepScrollOffset with:

    TypeError: undefined is not an object (evaluating 's.$().position().top')
_getStepScrollOffset
goToStep
_handleStepChanged
(anonieme functie)
fireEventsap-ui-core.js:142:70157
fireEventsap-ui-core.js:151:133004
(anonieme functie)sap-ui-core.js:151:39662
_updateCurrentStep
discardProgress
discardProgress
wizardCompletedHandler
fireEventsap-ui-core.js:142:70157
fireEventsap-ui-core.js:151:133004
(anonieme functie)sap-ui-core.js:151:39662
_handleNextButtonPress
(anonieme functie)
fireEventsap-ui-core.js:142:70157
fireEventsap-ui-core.js:151:133004
(anonieme functie)sap-ui-core.js:151:39662
ontap
_callEventHandlessap-ui-core.js:151:131004
_handleEventsap-ui-core.js:151:130686
_handleEventsap-ui-core.js:151:176640
psap-ui-core.js:59:4274
dispatchsap-ui-core.js:70:39408
g
p
dispatchsap-ui-core.js:70:39408
handlesap-ui-core.js:70:35830
triggersap-ui-core.js:70:38467
(anonieme functie)sap-ui-core.js:70:46747
eachsap-ui-core.js:59:3191
eachsap-ui-core.js:59:902
triggersap-ui-core.js:70:46720
P
R
dispatchsap-ui-core.js:70:39408
handlesap-ui-core.js:70:35830

If more information is required let me know. Kind regards, Max

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
MaxNijholtcommented, Dec 18, 2015

Hi, I have the following: In the view i have about 7 Wizard steps. Each with their own content. Which I have removed here since I believe they are not part of the issue.

<mvc:View class="viewPadding" controllerName="controller.Wizard" xmlns:core="sap.ui.core" xmlns:u="sap.ui.unified" xmlns:l="sap.ui.layout" xmlns:f="sap.ui.layout.form" xmlns:m="sap.m" xmlns:mvc="sap.ui.core.mvc" xmlns:vh="sap.ui.commons.ValueHelpField" >
    <m:Page id="pageid" showNavButton="false" title="{i18n>Wizard_Title}">
        <m:content>
            <m:Wizard complete="wizardCompletedHandler" id="SettingsWizard" stepIcons="sap-icon://form" >
                <m:WizardStep id="wiz1" title="{i18n>Wizard_Wiz1Title}">
                    <f:SimpleForm class="editableForm" columnsL="1" columnsM="1" editable="true" emptySpanL="1" emptySpanM="1" id="Wiz1Form" labelSpanL="4"
                        labelSpanM="4" layout="ResponsiveGridLayout" maxContainerCols="2" minWidth="1024">
                        <f:content>
                   <!--- content here --->
                        </f:content>
                    </f:SimpleForm>
                </m:WizardStep>
            <!--- more WizardSteps --->
            </m:Wizard>
        </m:content>
    </m:Page>
</mvc:View>

In the controller I’m using the function wizardCompletedHandler. This is the same function I’ve declared in the view to be in charge of the complete event.

    onInit: function() {
                this._wizard = this.getView().byId("SettingsWizard");
                this.getView().setModel(Appconfig.getModel(), "Config");
                var oRouter = sap.ui.core.UIComponent.getRouterFor(this);
                oRouter.getRoute("Wizard").attachMatched(this._onRouteMatched, this);

            },
            wizardCompletedHandler: function() {
                Appconfig.updatePersistent();
                sap.ui.core.UIComponent.getRouterFor(this).navTo("Tiles");
                // this._wizard.goToStep(this.getView().byId("wiz1"));
                // this._wizard.discardProgress(this.getView().byId("wiz1"));
                this.getView().byId("SettingsWizard").discardProgress(this.getView().byId("wiz1"));
            },

Kind regards, Max

0reactions
nikolay-kolarovcommented, Mar 24, 2022

Hi,

I think this old issue was not maintained correctly, as the internal issue is closed with fix.

Best Regards, Nikolay

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to reset a wizard sapui5 - Stack Overflow
oWizard.discardProgress( oWizard.getSteps()[0] );. Discards all progress done from the given step(incl.) to the end of the wizard.
Read more >
SAPUI5: Working with Wizard Control (sap.m.Wizard)
I have been facing this issue, when I use discardProgress method to reset the progress of the wizard and go back to the...
Read more >
sap.m.Wizard - API Reference - Demo Kit - SAPUI5 SDK
m.Wizard . The passed function and listener object must match the ones used for event registration. discardProgress.
Read more >
JsDoc Report - API Reference - sap.m.Wizard - OPENUI5 SDK
Wizard . discardProgress(step)Discards all progress done from the given step(incl. fireComplete(mArguments?)Fires event complete to attached listeners.
Read more >
Example for invalid wizard scroll position issue if sub-views ...
discardProgress (oStep2); oStep2.setValidated(true); } }); }); <mvc:View controllerName="Wizard.App" displayBlock="true" xmlns:mvc="sap.ui.core.mvc" ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found