Skip to Content
0
Sep 18, 2018 at 08:04 AM

Extend SAPUI5 Model and use it in manifest

86 Views Last edit Sep 18, 2018 at 08:05 AM 2 rev

Dear All,

I would like to extend a JSONModel and use it in my manifest.json

I have declare it in the manifest.json like below (test.models.JSONModel:

"models": {
            "i18n": {
                "type": "sap.ui.model.resource.ResourceModel",
                "settings": {
                    "bundleName": "test.i18n.i18n"
                }
            },
            "clConfiguration": {
                "type": "test.models.JSONModel
",
                "dataSource": "clConfiguration",
                "preload": true
            },
            "clDepots": {
                "type": "test.models.JSONModel
",
                "dataSource": "clDepots",
                "preload": true
            }
        },


But when I refresh my application my specific model is not called.

I have an error too : TypeError: Cannot read property 'refresh' of undefined

My specific JSONModel is just a copy of the existing JSONModel but I want to customize it for some needs.

The model seems to be loaded in the chrome tools but is never executed (I put a debugger; line in the constructor)

Could you please let me know why is not called ?

Attachments