ISidePaneCloseData
Use this function to get a response for the sidePane open event response.
Functions
getId
Use this function to get the ID of the closed
sidePane:
getId(): string;Here's an example in Typescript of SidePaneOpen event
subscription:
const listenSidePaneCloseEvent = 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('cxEventBusSidePaneCloseEvent');
sidePaneContext.subscribe(payload, (res: IEventResponse) => {
const response:ISidePaneCloseEventResponse = res as ISidePaneCloseEventResponse;
const sidePaneCloseData: ISidePaneCloseData = response.getResponseData();
const id: string = sidePaneCloseData.getId();
})
}Here's an example in JavaScript of of SidePaneOpen event
subscription.
const listenSidePaneCloseEvent = async () => {
const uiEventsFrameworkInstance = await CX_SVC_UI_EVENTS_FRAMEWORK.uiEventsFramework.initialize('appname', 'v1');
const sidePaneContext = await uiEventsFrameworkInstance.getSidePaneContext('sidePaneId');
const payload = uiEventsFrameworkInstance.requestHelper.createSubscriptionRequest('cxEventBusSidePaneCloseEvent');
sidePaneContext.subscribe(payload, (res) => {
const sidePaneCloseData = res.getResponseData();
const id = sidePaneCloseData.getId();
});
}