requestData
requestData
Sends a fresh data request to the given Provider Instance.
Parameters
provInstName(String): The name of the Provider Instance to request from
Returns: None (void)
Description
Sends a data request to a Provider Instance configured in Studio. When the response arrives, the connected DataSet updates automatically and the bound UI refreshes.
In many cases you need to set the InBlock (input parameters) with setDSValue before making the request.
Example
$vm.requestData("dummy-json_PI");
// InBlock에 입력값 설정 후 요청
$vm.setDSValue("TR_LOGIN.inBlock.szID", "user01");
$vm.setDSValue("TR_LOGIN.inBlock.szPwd", "pass1234");
$vm.requestData("TR_LOGIN");
// 버튼 탭 이벤트에서 조회 요청
btnSearch.onTap = function() {
$vm.setDSValue("SEARCH.inBlock.keyword", txtKeyword.text);
$vm.requestData("SEARCH");
};
Related
$vm.requestNextData(provInstName)— request the next page of data$vm.setDSValue(path, value)— set a DataSet value (used for InBlock input)