using mobiscroll with a dataset from an invoke service - Forum - Mobile - Progress Community

using mobiscroll with a dataset from an invoke service

 Forum

using mobiscroll with a dataset from an invoke service

This question is answered

Hi there,

I have recently seen what mobiscroll can do and i am now wanting to implement this into my mobile app.

I would like to know if anyone has used mobiscroll with a dataset from an invoke service. The examples I have seen, use hard coded data.

thanks.

Verified Answer
  • 
    

    Hello,

    I have not used Mobiscroll but from reading the documentation and looking at the examples, it seems to work with the JQuery model for building apps.

    The following link shows that the listview in Mobiscroll has an add() method that can be used to add items to the list:

    docs.mobiscroll.com/.../listview

    On the success of an Invoke Service, you get a data parameter. This data parameter corresponds to the response from the server. The response object includes a parameter for the dataset, the dataset itself and its tables. You can then use JavaScript to process the code:

    var listitems = "";
    var array = data.dsCustomer.dsCustomer.eCustomer;
    for (var i=0;i<array.length;i++) {
        listitems += "<li>" + array[i].Name + "</li>";			
    }	$("#listview").append(listitems).listview("refresh");
    The example above use a JQuery listview. The usage is somewhat similar from Mobiscroll.
    You can see an example of an invoke operation from JavaScript at the following URL: http://oemobiledemo.progress.com/jsdo/example004.html
    I hope this helps.
All Replies
  • Anyone following this forum could assist meyrick please?

  • 
    

    Hello,

    I have not used Mobiscroll but from reading the documentation and looking at the examples, it seems to work with the JQuery model for building apps.

    The following link shows that the listview in Mobiscroll has an add() method that can be used to add items to the list:

    docs.mobiscroll.com/.../listview

    On the success of an Invoke Service, you get a data parameter. This data parameter corresponds to the response from the server. The response object includes a parameter for the dataset, the dataset itself and its tables. You can then use JavaScript to process the code:

    var listitems = "";
    var array = data.dsCustomer.dsCustomer.eCustomer;
    for (var i=0;i<array.length;i++) {
        listitems += "<li>" + array[i].Name + "</li>";			
    }	$("#listview").append(listitems).listview("refresh");
    The example above use a JQuery listview. The usage is somewhat similar from Mobiscroll.
    You can see an example of an invoke operation from JavaScript at the following URL: http://oemobiledemo.progress.com/jsdo/example004.html
    I hope this helps.