Skip to Content
avatar image
Former Member

sap.m.wizard in which the steps can be dynamically rendered

Hi experts,

I'm trying to create a wizard, which will have steps based on data given from backend.

flow can be: 1-2-3-4-5
1-3-4-5
1-2-4-5
1-3-5

....

Problem I’m facing:
when we create the wizard dynamically,
if we click on item with 5 steps .. OKAY
then we click on item with 7 steps .. OKAY
then we click on item with 6 steps .. ERROR
“dynamic step removal not yet supported”

Please provide some insight into this problem.
thanks in advance

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jan 19, 2017 at 08:39 AM
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 03 at 02:37 PM

    Hey,

    I am also trying to create my WizardSteps dynamicly but I still couldn't manage to achieve it. I am trying to load a ComponentContainer in the "Content" aggregation of the WizardStep, which should load another UI5 application. All I see is the error message "Cannot read property '_activate' of undefined"


    My JSON-Model
    {   
        "Action":{
                "ActionId":"500",
                "ActionTitle":"Einladung TI",
                "Steps":[
                {
                    "StepId":"1",
                    "StepSeq":"1",
                    "StepTitle":"Termin",
                    "StepValidated": false,
                    "StepComponentPath":"xxxx.actions.appointment"
                },
                {
                    "StepId":"2",
                    "StepSeq":"2",
                    "StepTitle":"HTML E-Mail",
                    "StepValidated": false,
                    "StepComponentPath":"xxxx.actions.correspondence"
                },
                {
                    "StepId":"3",
                    "StepSeq":"3",
                    "StepTitle":"Vakanzen",
                    "StepValidated": false,
                    "StepComponentPath":"xxxx.actions.vacancies"
                }
            ]
        }
    }
    
    _onRouteMatched-Method:
    _onRouteMatched: function(oEvent){
                var oComponentModel;
                var oView = this.getView();
                var oWizardLayout = oView.byId("idWizardLayout");
                
                if (oView.getModel("UICustomizing")) {
                    oComponentModel = oView.getModel("UICustomizing");      
                } else {
                    oComponentModel = new JSONModel();
                }
                oComponentModel.oData = {};
    
                oComponentModel.attachRequestCompleted(null, function () {
                    oView.setModel(oComponentModel, "UICustomizing");
                    oWizardLayout.bindAggregation("steps",{
                        path:"UICustomizing>/Action/Steps",
                        template: new sap.m.WizardStep({
                            title:"{UICustomizing>StepTitle}",
                            validated:"{UICustomizing>StepValidated}",
                            activate:function(){
                            },
                            content:[
                                new sap.ui.core.ComponentContainer({
                                    name:"{UICustomizing>StepComponentPath}",
                                    propagateModel:"true"
                                }) 
                                
                            ]
                        })
                    });
    
                });
    
                oComponentModel.loadData("model/actions_model.json");
            }
    
    and my View:
    <mvc:View controllerName="de.otto.bms.candidate.actions.controller.Main" 
        xmlns="sap.m" 
        xmlns:mvc="sap.ui.core.mvc" 
        xmlns:core="sap.ui.core">
        <Page title="{i18n>main.title}">
            <Wizard id="idWizardLayout" complete="wizardCompletedHandler">
                
            </Wizard>
        </Page>
    </mvc:View>
    
    
    
    Add comment
    10|10000 characters needed characters exceeded