how do I close a layout?
I use one layout for edit mode and one for browse mode - want to switch back and forth closing each as I alternate.
Also - I would like to prevent user from closing layout in certain circumstances - where do i trap this?
sarar:
how do I close a layout?
You can use the function dc_closeTab() on a form that extends svy_nav_base.
sarar:
Also - I would like to prevent user from closing layout in certain circumstances - where do i trap this?
The form that shows the tabs and includes the functions to close tabs (closeTab and closeTabs) has to extend the form svy_nav_fr_openLayouts_base.
The default design of the framework uses the form svy_nav_fr_p_openTabs for this.
To add your own functionality you have to extend this form and override those methods.
Make sure to tell the framework to use your new form in the onOpen method of your solution by doing:
globals.nav.openLayoutFormName = "yourOwnFormShowingTheTabs";
Not sure if you know this, but the framework already has basic support to show the main layout of a program when going to edit mode. Is this what you want, if so then you’re trying to reinvent the wheel