cancel
Showing results for 
Search instead for 
Did you mean: 

Manifest.json settings in Component.js file in UI5

prasad
Participant
0 Kudos

Hi all,

we have a SAP note to be followed as part of remediation to upgrade of SAP_UI component

"2500102 - My inbox Console Error: Cannot get UI2ShellService - Error: Service UI2ShellService not declared! cross.fnd.fiori.inbox.Component"

This note says that to maintain below setting

" add a reference to ShellUIService inside the "sap.ui5" block in the manifest.json file in your customized application like this: "services":{ "ShellUIService": { "factoryName": "sap.ushell.ui5service.ShellUIService" }"

but our extended app doesnot support Manifiest.json file .

How can we maintain above setting in Component.js?

Thanks

Prasad

Accepted Solutions (0)

Answers (2)

Answers (2)

mvaibhav
Contributor

Ideally these settings should be maintained in manifest.json file and the file should be referenced in your component.js file.

For Example:

sap.ui.core.UIComponent.extend("yourComponent.Component",

{

metadata: { manifest: "json" },

init() {}

});

But if you want to maintain it in component.js file , you will need to declare the details in the metadata tag.

metadata: {

services :{ ShellUIService:

{ factoryName: "sap.ushell.ui5service.ShellUIService" }

}

}

junwu
Active Contributor
0 Kudos

why your component doesn't support manifest?

even it is not supported, you can put configuration in component.js