loadFileData
loadFileData
Reads a JSON file from the local asset data folder and applies it as the given Provider Instance's response data.
Parameters
provInstName(String): The name of the Provider Instance to apply the data tofileName(String): The JSON file name inside the asset data folder (e.g."sample.json")
Returns: None (void)
Description
Use it to populate a form's DataSet from a local file, without the network. Internally the file data is applied to the pi.{provInstName} path, so the DataSet bound to that Provider Instance updates automatically.
Example
// 에셋 data 폴더의 stock_list.json을 stockProvider에 적용
$vm.loadFileData("stockProvider", "stock_list.json");
Related
$vm.requestData(provInstName)— request data from the server