7

I'm looking for a document with the possible metadata property names and config parameters for a component.

There are many documents on the internet with such definition. The question is how I know if the name of a property/parameter setting is a valid name.

metadata : {
    name : "XXXXX",
    version : "1.0",
    includes : [],
    dependencies : {
        libs : ["sap.m", "sap.ui.layout"], 
        components : []
    },

    rootView : "XXXXX",

    config : {
        resourceName : "i18n",
        resourceBundle : "XXXX",
        serviceConfig : {
            name : "main",
            serviceUrl : "XXXXX",
        }
    }
Boghyon Hoffmann
  • 17,103
  • 12
  • 72
  • 170
user2419908
  • 137
  • 2
  • 12
  • 1
    Please take the time to accept the answer that helped you solving your problem as described [in the Tour](http://stackoverflow.com/tour). – Tim Gerlach Jun 10 '16 at 07:03

7 Answers7

6

There is a document available here which describes all possible metadata. Since there is no real assistance during design-time, you have to have a look in the API to check the possible values. If you want to extend it with your own properties/parameters, just make sure that the name is not too generic since the Component can be extended with each new version of UI5.

Boghyon Hoffmann
  • 17,103
  • 12
  • 72
  • 170
Tim Gerlach
  • 3,390
  • 3
  • 20
  • 39
2

The approach of defining component metadata in the component itself has been superseded by an approach using a manifest file. You will find all available properties in the documentation .

matbtt
  • 4,230
  • 19
  • 26
1

The Component class extends the ManagedObject class and provides specific metadata for components. The UIComponent class provides additional metadata for the configuration of user interfaces or the navigation between views.

The metadata defined in component.js is common for faceless components and UI components. The following parameters are available:

abstract: Specifies if your component class is an abstract class that serves as a base for other components

version: Version of your component; this parameter belongs to the design-time metadata and is currently not used; it may be used in the future in the design-time repository

includes: Array of strings containing the paths to CSS and JavaScript resources for your component; will be added to the header of the HTML page and loaded by the browser. The resources will be resolved relative to the location of Component.js.

dependencies: Used to specify all external dependencies, such as libraries or components. Like the includes for resources that are added to the application’s HTML, the dependencies are loaded by SAPUI5 core before the component is initialized. Everything that is referenced here can be used in your component code right from the start. Specify here external dependences such as libraries or components, that will be loaded by SAPUI5 core in the initialization phase of your Component and can be used after it.

libs: Path to the libraries that should be loaded by SAPUI5 core to be used in your component

components: Full path to the components that should be loaded by SAPUI5 core to be used in your component

ui5version: Minimum version of SAP UI5 that the component requires; it helps to be ensure that the features of SAPUI5 runtime used in this component are available. As SAPUI5 currently does not enforce the use of the correct version, it is only used for information purposes.

properties: Defined for components in the same way as for a control or view

library: Specify the library the component belongs to

config: Static configuration; specify the name-value pairs that you need in the component

customizing: Customizing for components and views, see Extending SAPUI5 Applications

sap.ui.viewExtensions: Used for providing custom view content in a specified extension point in the standard application

sap.ui.viewModifications: Used for overriding control properties in the standard application

sap.ui.viewReplacements: Used for replacing a standard view with a custom view

sap.ui.controllerExtensions: Used for replacing a standard controller with a custom controller


for more Information go to the url:
https://sapui5.netweaver.ondemand.com/sdk/#docs/guide/0187ea5e2eff4166b0453b9dcc8fc64f.html
Abul
  • 119
  • 6
1

Well, from the code you could check if the property exist with the get(Property Name) method that all elementes have. Otherwise all the properties ad hoc are in this url that Tim Gerlach shared for you before.

0

If it is a regular development approach, you should ideally look at the API of the component class.

If you are using metadata driven approach for development and you might generate the required code then you should fetch details from metadata information provided by the class or read it from .js file. ".js" will be helpful if you are not using SAPUI5 runtime.

Hope, this helps.

.........
Good Luck

Gana
  • 482
  • 3
  • 11
  • 32
0

Final answer has to be by looking through the source code as nothing else, even the API documentation, will be able to be 100% accurate against the consuming source.

Vanquished Wombat
  • 9,075
  • 5
  • 28
  • 67
0

As mentioned in the documentation, the definition of Component's metadata has largely moved to a separate file named manifest.json (aka. Application Descriptor).

With the introduction of the descriptor for applications, components, and libraries, we recommend to migrate the component metadata to the descriptor. [...] For more information, see Descriptor for Applications, Components, and Libraries.


Besides just looking at the list of available parameters in the doc, the closest "assistance" you could get is the Descriptor Editor from Web IDE.

Web IDE manifest.json Descriptor Editor

The Descriptor Editor provides available choices, placeholder suggestions, and input validation.

Boghyon Hoffmann
  • 17,103
  • 12
  • 72
  • 170