Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
250
Mobile Listview detail page events
posted

Seeing there is no mobile forum yet I will put this question in here.

 

I am trying to retrieve information from the current Item Details page from a button click on the details page.  For the first page it will works find and I am able to get the values that I need from a simple selector; however, after the going to a different item’s detail page I run into the problem of the values not changing. I see that the detail  pages are not removed from the DOM when you navigate back to the list so I know why my selector pulls back the value from the first details page listed.  I thought about selecting the last item in the DOM but if you have already visited an item it is not listed as the last item.   

 

So I decided to try to use the “subPageCreated” event that I assume would fire when the page is added to the DOM,  but I have not been able to get it to fire when going to the details page.  Can someone please tell me what I am missing in getting this wired up to the list view, or it that is not the correct way any guidance would be appreciated. 

 

 

 

var poNumber = “”;

 

   $("#btnComplete").live("click", function () {

            

        var CompleteCallLink;

        CompleteCallLink = '../Home/CompleteCallMobile?PONumber=' + encodeURIComponent(“poNumber”);

        var test = CompleteCallLink;

        $.ajax({

            url: CompleteCallLink,

            success: function (data) {

                poNumber = "";

                alert('Call was Completed.');

            }

        });

 

    })

 

 

 

 

$( '#mainPage' ).live( 'pageinit',function(event){

   

       

        $(document).delegate("#listView", "iglistviewsubpagecreated", function (evt, ui) {

          var owner =  ui.owner;

          var subpage =  ui.subPage;

poNumber = $("#ponumberHeading").text();

 

 

        });

   

……..

Parents
  • 33839
    Verified Answer
    posted

    Hi jagwynn,

    You are actually attaching to the wrong event.  You should be attaching to iglistsubpagecreated.  The list view is similar to our hierarchical grid  The list view is the hierarchical container than instantiates other igList widgets.  A lot of events live on igList rather than igListView.  This is one of them.  Refer to the documentation for complete lists.  Try this and you should get the page you're interested in.  If you see anything that you think the list view might be missing or could use an enhancement, don't hesitate to tell me.  We'd love to know what you think.

    regards,
    David Young 

Reply Children