What is the meaning of "controlAggregation" in the SAPUI5 routing configuration?

I really don't understand what the Aggregation control property does below to route the SAPUI5 application. There is no element with this id. I can’t find the link to the “pages” anywhere in the demo application found here: SAPUI5 routing demo

"routing": {
        "config": {
            "routerClass": "sap.m.routing.Router",
            "viewType": "XML",
            "viewPath": "sap.ui.demo.nav.view",
            "controlId": "app",
            "controlAggregation": "pages",   // what does this do?
            "transition": "slide",
            "bypassed": {
                "target": "notFound"
            }

Views are defined as below - no "page" is mentioned

<mvc:View
    controllerName="sap.ui.demo.nav.controller.App"
    xmlns="sap.m"
    xmlns:mvc="sap.ui.core.mvc"
    displayBlock="true">
    <App id="app"/>
</mvc:View>

AND

<mvc:View
    controllerName="sap.ui.demo.nav.controller.Home"
    xmlns="sap.m"
    xmlns:mvc="sap.ui.core.mvc">
    <Page title="{i18n>homePageTitle}" class="sapUiResponsiveContentPadding">
        <content>
            <Button id="displayNotFoundBtn" text="{i18n>DisplayNotFound}" press="onDisplayNotFound" class="sapUiTinyMarginEnd"/>
        </content>
    </Page>
</mvc:View>
+4
source share
1 answer

controlAggregation is the target aggregation to which the view is added.

as in this case target is sap.m.App whose identifier is app .

.

. .

:

, controlId - , .

- .

, . enter image description here

, navigateTo category/{id}, sapui5 , . category.

viewName ( ) targets (. , catagory, products...). SapUI5 . ?

: ( ), . masterPages. , controlId config. splitApp. , , . i.e:

  • viewName : Category,
  • controlId(the container of view) : splitApp
  • controlAggregation : masterPage

sapui5 category masterPage splitApp.

---- ** , targets, config. , , .

, sapui5 pages app.

, .

+5

Source: https://habr.com/ru/post/1649302/


All Articles