Create and remove dynamic tabs

Technologies > User Interface Add-Ins > Assemblies with Multiple Panes > Dynamic Tabs

The standard tabbed panel can create new tab pages on request. These dynamic tab pages always display external views, and internally use IFRAME elements to load the view content.

The createTabPage view command can then be used to create new tab pages, typically when the user clicks on a button:

<command type="createTabPage" viewName="ab-ex-work-request-dynamic-page.axvw"/>

The content view is responsible for setting its title based on the view content.

If the command is attached to the grid row link or button, it will apply the selected row restriction to the tab page and its target view. This restriction is used to prevent duplicate tab pages with the same content to be displayed. For example, if the user selects the same work request for review again, without closing the previously opened work request tab page, the existing tab page will be re-selected.

Dynamic tab pages can be used to edit new records, if the newRecord flag is set:

<command type="createTabPage" viewName="ab-project-details.axvw" newRecord="true"/>

The tabbed panel can attach an event handler to the tab Close button. When the user clicks to close the tab, the event handler will be called:

<tabs id="projects" workflow="free" tabRefreshPolicy="refreshOnLoad">
<event type=" beforeTabClose ">
<command type="callFunction" functionName=" wr_tabs_beforeCloseTab "/>
</event>

The event handler can check whether the tab page form has unsaved changes, and perhaps asks the user to confirm close without save. The event handler can veto the tab close by setting the canClose output parameter to false.

function wr_tabs_beforeCloseTab(context) {
if ... context.canClose = false;
}

View: http://localhost:8080/archibus/schema/ab-products/solutions/assemblies/tabbed-views/dynamic-tabs/ab-ex-work-request-dynamic-tabs.axvw