Page 1 of 1

How to avoid refresh delay when reading data on page load ?

Posted: Sat Nov 30, 2013 11:09 am
by Jean-Philippe Steck

With master-detail pages. I do :

  • set the id of the selected item in local storage

  • naviage to detail page

  • on 'page show' in the detail page I read data from the database using the id

  • the detail page has a back button to return to the master list

    My problem is that the detail page is showing the previous data for 1-2 seconds until the read service has returned and the contente of the page is refreshed.

    How to avoid this ?


How to avoid refresh delay when reading data on page load ?

Posted: Sat Nov 30, 2013 11:13 am
by Alena Prykhodko

Hello Jean-Philippe,

Please try to use Load event instead of Page show.


How to avoid refresh delay when reading data on page load ?

Posted: Sun Dec 08, 2013 4:39 pm
by Jean-Philippe Steck

The page is not refreshed with Load Event : the invoke service action seems to be called only the very first time.


How to avoid refresh delay when reading data on page load ?

Posted: Sun Dec 08, 2013 5:12 pm
by maxkatz

Load event is only fired once, when the page is loaded into the DOM. When you navigate to the page and the page is already in the browser, then the event won't be fired. An alternative is to use page show event.

You see the previous values on the page because when you navigate to the page, the page currently in the DOM (with old values) is shown. A second or two later, the page is updated with new values after service invocation.