OData single entity responses not processed

3 posts, 0 answers
  1. Terje
    Terje avatar
    3 posts
    Member since:
    Feb 2014

    Posted 26 Aug 2015 Link to this post

    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

    1. SelectedID changes.
    2. SelectedTransaction is triggered to read().
    3. The URL function is called and returns the correct URL.
    4. An XHR goes out and a response comes back with appropriate OData JSON for the selected transaction.
    5. 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.

  2. Georgi Krustev
    Georgi Krustev avatar
    3725 posts

    Posted 31 Aug 2015 Link to this post

    Hello Terje,

    It is quite unexpected behavior. The datasource should either call the error or the change event handler (the parse, data, total callbacks are called here). If there are not JavaScript errors, the behavior becomes even stranger.

    In order to assist you further, we will need to review the issue locally. Would it be possible to send us a repro Dojo demo or runnable test project? This will allow us to debug the case and find the cause of the issue.

    Georgi Krustev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Terje
    Terje avatar
    3 posts
    Member since:
    Feb 2014

    Posted 02 Sep 2015 Link to this post

    Because of this issue plus another requirement coming up that would require filtering OData URLs aren't a natural fit for, we've moved over to a WebAPI backend with less conventions for us to break. This issue hasn't come back up there, so I probably won't have time to make a repro demo unfortunately.
Back to Top