ISidePaneData
Use this function to get a response for the sidePane open event response.
Functions
getActiveSectionId
Use this function to get the session ID of the opened
sidePane:
getActiveSessionId(): string;getId
Use this function to get the ID of the opened
sidePane:
getId(): string;Here's an example in Typescript of SidePaneOpen Event where the
ISidePaneOpenEventResponse object is
used.
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();
});
}Here's an example in JavaScript of SidePaneOpen Event where the
ISidePaneOpenEventResponse object is
used.
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());
});
}