UpdateSidePane operation - setVisibility
This operation is used to update a particular side pane's section or icon or
visibility in the Fusion application. The ID of that sidePane should be passed while
creating the SidePaneContext object.SidePane visibility can be turned True or False by
calling the setVisibility
API.
Here's a TypeScript example:
const updateSidePaneContext = async () => {
const uiEventsFrameworkInstance: IUiEventsFrameworkProvider = await CX_SVC_UI_EVENTS_FRAMEWORK.uiEventsFramework.initialize('appname', 'v1');
const sidePaneContext: ISidePaneContext = await uiEventsFrameworkInstance.getSidePaneContext('sidePaneId');
const payload:IUpdateSidePaneRequest = uiEventsFrameworkInstance.requestHelper.createPublishRequest('UpdateSidePane') as IUpdateSidePaneRequest;
payload.setVisibility(true);
sidePaneContext.publish(payload).then((response: IOperationResponse) => {
console.log(response)
}).catch(() => { })
}
Here's a JavaScript example:
const updateSidePaneContext = async () => {
const uiEventsFrameworkInstance = await CX_SVC_UI_EVENTS_FRAMEWORK.uiEventsFramework.initialize('appname', 'v1');
const sidePaneContext = await uiEventsFrameworkInstance.getSidePaneContext('sidePaneId');
const payload = uiEventsFrameworkInstance.requestHelper.createPublishRequest('UpdateSidePane');
payload.setVisibility(true);
sidePaneContext.publish(payload).then((response) => {
console.log(response);
}).catch(() => { })
}