Using this writable OData v2 sample service (not Northwind), I'm binding a single Category entity to a container control while expanding to the entity set Products. Inside the container control, I have a list which has an aggregation binding to the items with the products coming from the expand.
<Page binding="{
path: 'odataModel>/Categories(1)',
parameters: {
expand: 'Products'
}
}">
<List items="{odataModel>Products}">
<StandardListItem title="{odataModel>Name}" />
</List>
</Page>
The problem is that the list doesn't show the names of the products, although I get the correct length of the collection. And there are no error messages either.
Here is the example implementing the sample OData service: https://embed.plnkr.co/bC2KPe/.
Weirdly, the binding path of each item is reported as "/[object Object]"
instead of something like "/Products(1)"
.
The properties of the products are visible if...
- I do the same with the Northwind service instead, which is readable only (But what I need is a writable service)
- I bind the products directly to the list without the parent's element binding.
- I delete a single product (e.g. manually
"/Products(0)"
as it can be seen in the plunker example). After that, the product names are visible.
What's wrong with this sample service? Do I have to configure my ODataModel according to that service specifically? Is it just the service that is not working properly?
Also I wanted to replace Products with a different entity set but all the other entity sets (Suppliers and Categories) navigate to Products only.
Is there any other free writable sample OData V2 service I can test?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…