Navigation properties are, as the name suggests, properties with which you can navigate to related entity types. The UI5 framework supports this feature too so that app developers don't have to extract URLs by hand. In fact, you won't even need to call read
. Let's take this entity data model for example:
CustomerSet
NavigationProperty: "ToOrders"
1 ___ n
OrderSet
NavigationProperty: "ToCustomer"
Navigating from one entity to a collection of entities:
<Page><!-- bound to /CustomerSet('ALFKI') -->
<List items="{ToOrders}">
<StandardListItem title="{OrderID}" />
</List>
</Page>
Navigating from one entity to another one entity:
<Page><!-- bound to /OrderSet(10643) -->
<Panel binding="{ToCustomer}" headerText="{CustomerName}" />
</Page>
The ODataContextBinding
and ODataListBinding
will then send requests for you automatically.
The binding
in XML code above is one of the ways to bind a single entity.
See also the documentation topic Context Binding (Element Binding).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…