Show TOC

Aggregation Handling in XML ViewsLocate this document in the navigation structure

In XML views, child controls can be simply added as child tags.

Some controls have more than one content area, for example the shell control that has the main content area, a pane bar, a headerItems aggregation, worksetItems, and so on. Hence, an aggregation tag usually serves as direct child of a container and contains children. It is only possible to directly add children as shown in the example above if the container control has marked one of the child aggregations as default.

Some containers may not have default content, for example, the splitter container has two equally important content areas.

Note The framework supports you by issuing error message in case of errors in the aggregation handling in XML views.

You fill aggregations as shown in the following example.

Note The namespace of the parent control tag and the aggregation tag must be the same.
<core:View controllerName="sap.hcm.Address" xmlns="sap.ui.commons" xmlns:core="sap.ui.core">
      <content>  <!-- this is the general way of adding children: use the aggregation name -->
         <Image src=""/>
         <Button text="Press Me"/>