{dialog.object}getListData Method





The name of the list control to get the data from.


Gets a Javascript array (as an array of objects) with all of the data in the specified List control.


Gets the data from a List control. System fields, such as '*value', '*renderIndex', etc, are removed. You would use this method before making an Ajax callback that requires data from the List control.


//Submit data in a List to the server in an Ajax callbac
var data = {dialog.object}.getListData('LIST1');
var dataJSON = JSON.stringify(data);

//urlencode the JSON data so it can be submitted as part of the Ajax callback
var _dataToSubmit = A5.ajax.buildURLParam('_listData',dataJSON);

//make a callback. 'xb' is the Xbasic function that handles the callback.

//in the Xbasic function you will be able to refer to e._listData. This will have the List data in its 
//stringified format. Your Xbasic can do this to get an Xbasic array:
//dim p as p
//p = json_parse(e._listData);