Following is our formspider design (partial) for Sales Order transaction. We have a design where the screen is split into three split-panels from top to bottom. The bottom panel contain multiple tab panels with a minimum of three tabs. To get this structure I have got a total of around 20 separate panels:

OT_SO - the main panel

OT_SO_SPLIT - The main split panel which is split into NORTH and SOUTH

OT_SO_SPLIT_NORTH

OT_SO_SPLIT_SOUTH

OT_SO_SPLIT_SOUTH2 - south panel is further split into NORTH and SOUTH

OT_SO_SPLIT_SOUTH2_NORTH

OT_SO_SPLIT_SOUTH2_SOUTH

OT_SO_SPLIT_SOUTH2_SOUTH_TAB - This is where the three TABs are placed.

Am I doing it correctly? What is formspider professional way to get it done?

This is the panel structure that we will be using for all our moules/screens. That means, for every module I will have around 20 panels. Of this, 12 are non-datasource panels. Starting with item 13 above, we have datasource panels and these are the only panels that will change with every module/screens. All other panels will be same for all other modules in the application except for the name change. Mine is a very naturally occurring question. Is there a mechanism to assign datasource panels dynamically to the non-datasource panels? This will avoid creating twelve repetitive panels for every module. And there are hundred of modules.

As you have mentioned, your first 12 panels(non-datasource panels) are general containers. I guess during the application lifecycle, these containers should be displayed statically and the content (datasource panels) should be changed dynamically.

To assign a panel dynamically to another simple panel, you have to use api_panel.addPanel API. Using this API, you can change the content of a container panel(OT_SO_SPLIT_SOUTH2_SOUTH_TAB1/2/3, OT_SO_SPLIT_NORTH or OT_SO_SPLIT_SOUTH) dynamically. For example, to include the OT_SO_MAIN_GRID panel in the OT_SO_SPLIT_NORTH panel, you can use the following code:

where cellName is the name of the cell existing in the OT_SO_SPLIT_NORTH panel where the OT_SO_MAIN_GRID panel will be included.

In this way, the 12 containers panels can be used in common by every module since the content is dynamically added into these containers(non-datasource) panels. This will avoid creating twelve repetitive panels for every module.