SAP / openui5

OpenUI5 lets you build enterprise-ready web applications, responsive to all devices, running on almost any browser of your choice.
http://openui5.org
Apache License 2.0
2.96k stars 1.24k forks source link

SAP UI5 Application View loading twice #3406

Closed guptha460 closed 2 years ago

guptha460 commented 2 years ago

Hi, My UI5 application view is being instantiated twice. Please find the below masnifest.json file.

{ "_version": "1.12.0", "sap.app": { "id": "com.hersheys_productmix", "type": "application", "i18n": "i18n/i18n.properties", "applicationVersion": { "version": "1.0.0" }, "title": "{{appTitle}}", "description": "{{appDescription}}", "resources": "resources.json", "ach": "ach", "sourceTemplate": { "id": "html5moduletemplates.basicSAPUI5ApplicationProjectModule", "version": "1.40.12" } },

"sap.cloud": {
    "public": true,
    "service": "hersheys_productmix"
},

"sap.ui": {
    "technology": "UI5",
    "icons": {
        "icon": "",
        "favIcon": "",
        "phone": "",
        "phone@2": "",
        "tablet": "",
        "tablet@2": ""
    },
    "deviceTypes": {
        "desktop": true,
        "tablet": true,
        "phone": true
    }
},

"sap.ui5": {
    "flexEnabled": false,
    "rootView": {
        "viewName": "com.hersheys_productmix.view.App",
        "type": "XML",
        "async": true,
        "id": "app"
    },
    "dependencies": {
        "minUI5Version": "1.60.1",
        "libs": {
            "sap.ui.core": {},
            "sap.m": {},
            "sap.ui.layout": {}
        }
    },
    "contentDensities": {
        "compact": true,
        "cozy": true
    },
    "models": {
        "i18n": {
            "type": "sap.ui.model.resource.ResourceModel",
            "settings": {
                "bundleName": "com.hersheys_productmix.i18n.i18n"
            }
        },
        "oDetailViewModel": {
            "type": "sap.ui.model.json.JSONModel"
        }
    },
    "resources": {
        "css": [{
            "uri": "css/style.css"
        }],
        "js": [
            {
                "uri": "./util/formatter.js"
            }
        ]
    },
    "routing": {
        "config": {
            "routerClass": "sap.m.routing.Router",
            "viewType": "XML",
            "async": true,
            "viewPath": "com.hersheys_productmix.view",
            "controlAggregation": "pages",
            "controlId": "app",
            "clearControlAggregation": false
        },
        "routes": [
            {
                "name": "dashboard",
                "pattern": "",
                "target": [
                    "dashboard"
                ]
            },
            {
                "name": "detailView",
                "pattern": "detailView/{contextPath}",
                "target": [
                    "detailView"
                ]
            },
            {
                "name": "replace",
                "pattern": "replace",
                "target": [
                    "replace"
                ]
            }
        ],
         "targets": {
            "dashboard": {
                "viewType": "XML",
                "transition": "slide",
                "clearControlAggregation": false,
                "viewId": "dashboard",
                "viewName": "dashboard"
            },
            "detailView": {
                "viewType": "XML",
                "transition": "slide",
                "clearControlAggregation": false,
                "viewId": "detailView",
                "viewName": "detailView"
            },
            "replace": {
                "viewType": "XML",
                "transition": "slide",
                "clearControlAggregation": false,
                "viewId": "replace",
                "viewName": "replace"
            }
        }
    }
}

}

Please help me solve the issue.

Thanks.

prashantmuttepawar commented 2 years ago

Hi

Check the following links :

(1) https://github.com/SAP/openui5/issues/1746

(2)https://sapui5.hana.ondemand.com/sdk/#/topic/26ba6a5c1e5c417f8b21cce1411dba2c

Hope this will be usefull.

Regards

Prashant

flovogt commented 2 years ago

Hi @guptha460, thanks a lot for sharing your finding with us. Could you please provide further details, like which view is instantiated twice or even better provide a sample so we can analyse your finding further.

flovogt commented 2 years ago

Since there is no response from the author for more than 4 weeks I'm closing the ticket.