setNextDataFieldPath
setNextDataFieldPath
Sets the "next data key" field path that a WebSocket (Socket) Provider uses when requesting the next page.
Parameters
provInstName(String): The Provider Instance name. Both"piName"and"piName.provInfoName"forms are acceptedblockPath(String): The field path within the response OutBlock that holds the next-page key (e.g."E2738OutBlock2.nextbutton_attr")
Returns: boolean — true on success, false if the PI does not exist or is not a SocketProvInfo
Description
WebSocket (SocketProvInfo) only. It does not apply to REST API Providers.
Configures which OutBlock field of the server response the "key to use for the next request" is read from. On subsequent requestNextData calls, that field's value is automatically included in the next request.
Example
// E2738_0 PI의 응답에서 E2738OutBlock2.nextbutton_attr 필드를 다음 키로 사용
$vm.setNextDataFieldPath('E2738_0', 'E2738OutBlock2.nextbutton_attr');
// 이후 다음 페이지 요청
if ($vm.hasMoreNextData('E2738_0')) {
$vm.requestNextData('E2738_0');
}
Related
$vm.requestNextData(provInstName)— request the next page of data$vm.hasMoreNextData(provInstName)— check whether a next page exists