using mobiscroll with a dataset from an invoke service

Posted by meyrick on 09-Apr-2014 02:00

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.

Posted by egarcia on 16-Apr-2014 04:44


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

Posted by Jean Richert on 14-Apr-2014 09:39

Anyone following this forum could assist meyrick please?

Posted by egarcia on 16-Apr-2014 04:44


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.

This thread is closed