I'm consuming an OData source with two main routes: /odata/Transactions to get an overview and /odata/Transactions(ID) to get additional details. I put the overview data into a grid, and have a command in that grid to open a kendo window for details which should populate from the single entity route. *
I'm trying to solve this by using two datasources:
- viewModel.Transactions loads the overview as normal for DataSource and works well so far.
- viewModel.SelectedTransaction loads from an url computed from viewModel.selectedID. It has the same schema as Transactions except adding a few fields and using schema.data to wrap single objects in an array.
- The grid command sets viewModel.SelectedID
- A listener function is bound to SelectedID's "change" event to trigger viewmodel.SelectedTransaction.read(), since transport.url doesn't seem to work as a computed field that triggers directly.
When I use the command button what currently happens is
- SelectedID changes.
- SelectedTransaction is triggered to read().
- The URL function is called and returns the correct URL.
- An XHR goes out and a response comes back with appropriate OData JSON for the selected transaction.
- This message seems to then be dropped with no processing. Breakpoints in the datasource configuration's schema.data, schema.parse or errors are never hit. No exceptions are thrown.
I'm trying to find out why the OData response seems to go unprocessed. Any help is appreciated.
*: This is because the underlying data sources are maintained by different services. To get the extra details requires joining in tables in another database, and which database that is can vary between transactions. We would rather do this one at a time, when we know the user wants those details.