Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

The ExternalScreen class can be used to open different popups from the application and to communicate between the popups using WebSocket events.

To open a new external screen you need to use the global akioma.launchExternalScreen method.

Example:

akioma.launchExternalScreen({
      autostartObjects: 'DocViewerFrame',
      baseLayoutObject: 'AkiomaMainLayout',
      screen: {
           width: 900,
           height: 700 
      }
});


The most important attributes are the baseLayoutObject and autostartObjects, the name of the layout and initial auto starting object in layout.

Besides the baseLayoutObject and autostartObjects, there is an option to specify the initial size and position using the screen option as parameter to the method.

Note: When using the method to launchExternalScreen if the popup is already opened it will emit a "launchContainer" socket event, that means it will not open a new popup but try to use the existing one for launching.


Sending custom data in External Screen

If required to read custom data inside the external screen, the custom data can be specified in the launchExternalScreen options.

Example:

const ExternScreenOpts = {
	launchContainer: WindowName,
	baseLayoutObject: 'AkiomaDocviewerMainLayout',
	autostartObjects: 'mainDesktopDocViewerW',
	name: 'DocViewer',
	screenNamespace: WindowName,
	custom: {
		stamm_id: cStammId,
		id: oWin.opt.id
	}
};

	
ExternScreenOpts.onBeforeScreenUnload = () => {
	// close the linked
	akioma.ExternalScreen.popups.forEach(popup => popup.close());
};
	

akioma.launchExternalScreen(ExternScreenOpts);


  • No labels