locked
Refresh page RRS feed

  • Question

  • Hi. I am trying my best to refresh a page in lightswitch html.

    I am setting a boolean to false.

    myapp.BrowseServers.Servers_ItemTap_execute = function (screen) {
        myapp.showAddEditServer(screen.Servers.selectedItem, {
            afterClosed: function () {
                screen.Servers.load(); 
            }
        });
    };

    I am also tried the refresh method.

    If I F5 or go back and forth the item disappears correctly.

    The query name matched and so forth.

    Any pointers would be gratefully accepted.

    Thanks Scott

    Friday, October 30, 2015 10:35 AM

All replies

  • Scott,

    I believe the afterClosed portion receives two parameters as such,

    afterClosed: function (addNewScreen, navigationAction) {
        if (navigationAction == msls.NavigateBackAction.commit) {
            screen.Servers.refresh();
        }
    }

    You should be able to refresh to collection if the user committed the changes.  Have you tried something like this?

    Binu Agrawal

    Monday, November 2, 2015 5:28 PM
  • Hi Binu, Much appreciated you taking the time getting back to me on this. Sorry for the delay.

    I had originally tried this route when first trying to figure it out. Sorry to say I am in the same position.

    Bit strange as everything I read points to this solution but does't seem to work for me.

    Many thanks again.

    Scott

    Friday, November 6, 2015 8:19 AM