ISidePaneData
このファンクションを使用して、sidePaneオープン・イベント・レスポンスのレスポンスを取得します。
関数
getActiveSectionId
開いているsidePaneのセッションIDを取得するには、次のファンクションを使用します:
getActiveSessionId(): string;getId
開いているsidePaneのIDを取得するには、次のファンクションを使用します:
getId(): string;ISidePaneOpenEventResponseオブジェクトが使用されているSidePaneOpenイベントのTypescriptの例を次に示します。
const listenSidePaneOpenEvent = async () => {
const uiEventsFrameworkInstance: IUiEventsFrameworkProvider = await CX_SVC_UI_EVENTS_FRAMEWORK.uiEventsFramework.initialize('appname', 'v1');
const sidePaneContext: ISidePaneContext = await uiEventsFrameworkInstance.getSidePaneContext('sidePaneId');
const payload: IEventRequest = uiEventsFrameworkInstance.requestHelper.createSubscriptionRequest('cxEventBusSidePaneOpenEvent');
sidePaneContext.subscribe(payload, (res: IEventResponse) => {
const response = res as ISidePaneOpenEventResponse;
const responseData: ISidePaneData = response.getResponseData();
responseData.getActiveSectionId();
});
}ISidePaneOpenEventResponseオブジェクトが使用されるSidePaneOpenイベントのJavaScriptの例を次に示します。
const listenSidePaneOpenEvent = async () => {
const uiEventsFrameworkInstance = await CX_SVC_UI_EVENTS_FRAMEWORK.uiEventsFramework.initialize('appname', 'v1');
const sidePaneContext = await uiEventsFrameworkInstance.getSidePaneContext('sidePaneId');
const payload = uiEventsFrameworkInstance.requestHelper.createSubscriptionRequest('cxEventBusSidePaneOpenEvent');
sidePaneContext.subscribe(payload, (response) => {
const responseData = response.getResponseData();
console.log(responseData.getActiveSectionId());
});
}