SidePaneOpen Event
This event is used to listen to sidePane open events of a particular sidePane. You
must create the SidePaneContext object on top of which they call the SidePaneOpen
Event subscribe
API, by passing their interested sidePane's ID.
Here's a TypeScript example:
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 a JavaScript example:
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());
});
}