locked
Old data is shown when revisiting with different search parameter. RRS feed

  • Question

  • Hi,

    In my app, I use xhr to get data from remote server and Bind it using WinJS.Binding.List. Basically, the page is used to show restaurants based on locations/cuisines or some other search parameter.

    Now, the problem is, when I revisit the page, the old data is shown first while the xhr request is still progressing. How can I prevent this?

    P.S. : This page is not using search contract.

    Thanks,

    Monday, September 3, 2012 6:41 AM

Answers

  • Hi

    Of course, you can write a function to clean the WinJS.Binding.List.

    Then in your page life cycle, clean the Winjs.Binding.List first.

    And that's depend on your design.

    Tuesday, September 4, 2012 3:31 AM

All replies

  • Hi

    Of course, you can write a function to clean the WinJS.Binding.List.

    Then in your page life cycle, clean the Winjs.Binding.List first.

    And that's depend on your design.

    Tuesday, September 4, 2012 3:31 AM
  • Are you asking how to blank out your previous binding until the xhr returns the values?

    If so use Dino's advice!  If not, can you clarify your question?

    -Jeff


    Jeff Sanders (MSFT)

    Tuesday, September 4, 2012 7:46 PM
    Moderator