locked
LS HTML - hook into query pipeline (e.g. to show custom error dialog) like it can be done with the save pipeline RRS feed

  • Question

  • is there a way to "hook into" the query pipeline (e.g. to show the same customized generic error dialog in the JavaScript HTML client on any query error) like it can be done with the save pipeline?

    myapp.onsavechanges = function (e) { e.detail.promise = mysaveChanges(); };

    the problem is that all queries are autoexecuted, so the best workaround i found till now is to hack the screen.created event (so queries are still not autoexecuted) and trigger  all screen queries explicitly by

    function navigateBackAndShowError (error) { return myapp.navigateBack().then(function () { showError(error); }); } myapp.BrowseCustomers.created = function (screen) { screen.getCustomers().then(null, navigateBackAndShowError);

       screen.getOffers().then(null, navigateBackAndShowError); }

    just not looking like a good solution for me

    thx for help!





    • Edited by s - a Saturday, May 24, 2014 11:20 AM
    Friday, May 23, 2014 12:23 PM