Skip to Content
0

Aggregations of UI5 controls

Mar 01 at 09:58 AM

56

avatar image

Hi UI5 experts

I'm new in SAP UI5 and confused of aggregations during XML view creation. Take below code snippet as example (this is an example from OpenSAP course).

<mvc:View>
     <semantic:FullscreenPage>
           <semantic:content>
                 <smartform:SmartForm>
                       <smartform:Group>
                             <smartform:GroupElement>
                                   <smartfield:SmartField
                                         id="nameField"
                                         value="{Name}"/>
                             </smartform:GroupElement>
                       </smartform:Group>
                 </smartform:SmartForm>
           </semantic:content>
     </semantic:FullscreenPage>
</mvc:View>

In the API reference, aggregations allowed in "View" control is "content", but <semantic:FullscreenPage> was used.

<mvc:View>
     <semantic:FullscreenPage>
     </semantic:FullscreenPage>
</mvc:View>

In the API reference aggregations allowed for "semantic:FullscreenPage" control are manys and there is "content", so I can understand below code snippet.

<semantic:FullscreenPage>
    <semantic:content>
    </semantic:content>
</semantic:FullscreenPage>

But where can I find the allowed aggregations of "content“ ? what's the other controls I can use in <semantic:content> </semantic:content> ?

<semantic:content>
     <smartform:SmartForm>
     </smartform:SmartForm>
</semantic:content>

Thanks and Regards

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Jamie Cawley
Mar 01 at 02:11 PM
0

If you look at the docs for FullscreenPage

https://sapui5.hana.ondemand.com/#/api/sap.m.semantic.FullscreenPage/overview

you can see that it extends ShareMenuPage which extends SemanticPage.

Within the SemanticPage you will see the content aggregation which shows the expected type, which is sap.ui.core.Control. If you look at sap.ui.core.Control you can see the Known direct subclasses.

Regards,

Jamie

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Jamie

I am fresh in UI5 (even coding) and stucked on Aggregations for a long time.

Thank you so much for the clear guidence.

It's possible for me to track the aggregations of each control now.

Regards

1