简体   繁体   中英

Is the manifest.json for components only?

While reading the documentation to SAPUI5, I stumbled upon the part about the application descriptor ( See ). It says

The application descriptor provides a central, machine-readable and easy-to-access location for storing metadata associated with an application or application component.

Although it says "application" or "... component", I can not figure out how it is used for an application and if it is necessary to actually set a manifest.json up if I am not implementing a component.

Is there any clarification if and how the manifest.json is used within SAPUI5 for applications? Is the purpose maybe for data/implementation generation within the SAP Web IDE or for future plans?

I'd appreciate any answer on clarifying things, as SCN, SDN and the openUI5 pages don't give me a clue about it.

Thanks in advance.

The data in the manifest.json can be accessed from within your SAPUI5 app and (of course) it is used by the Component. You can only access it in your application in case you have a Component based app. Check the step 20 of the Walkthrough tutorial at https://openui5beta.hana.ondemand.com/#docs/guide/bf71375454654b44af01379a3c3a6273.html for an example of how to access the manifest.json:

// set invoice model - local
var oConfig = this.getMetadata().getConfig();
var sNamespace = this.getMetadata().getManifestEntry("sap.app").id;
var oInvoiceModel = new JSONModel(jQuery.sap.getModulePath(sNamespace, oConfig.invoiceLocal));
this.setModel(oInvoiceModel, "invoice");

And yes, the manifest.json (aka app descriptor) is also meant to be used by tools like the WebIDE or the container in which your app runs (think of the Fiori Launchpad).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM