Before 2.0 view format, you could create complex multi-panel views and dashboards using framesets. Since each frame in a frameset is rendered using a separate server request, such views are slower and create additional server-side load. Frames also it make more difficult to write custom JavaScript code.
With 2.0 view format, complex multi-panel views and dashboards can be created without frames, using a layout. The layout divides the screen space onto regions such as north, west, south, east and center. Layout regions are just HTML DOM elements that are automatically created by the view. The complete view requires only one HTTP request to render.
View 1.0 format | View 2.0 format |
---|---|
Frameset file:
<html> <frameset cols="30%,*"> <frame name="west"/> <frame name="center"/> </frameset> </html> AXVW file: <fileCategory extension="frms" fileName="ab-my-frames.frms"/> <afmTableGroup frame="west"> ... </afmTableGroup> |
Layout AXVW file:
<layout> <west split="true" initialSize="30%"/> <center/> </layout> AXVW file: <layout file="ab-my-layout.axvw"/> <panel id="em-grid" region="west"> ... <panel> |
The layout can also be defined in the same AXVW file:
View 1.0 format | View 2.0 format |
---|---|
<layout>
<west split="true" initialSize="30%"/> <center/> </layout> <panel id="em-grid" region="west"> ... <panel> |
Without frame boundaries, the AXVW view is now just a single HTML page. As a consequence, it is now easier for the custom JavaScript functions to get access to UI controls and data variables across the whole view.
View 1.0 format | View 2.0 format |
---|---|
var employeeGrid = AFM.view.View.getControl('west', 'em-grid'); var reservationType = AFM.view.View.getWindow('west').reservationType; if (reservationType) { ... } |
var employeeGrid = View.panels.get('em-grid'); if (reservationType) { ... } |
This also removes hard-to-troubleshoot frame synchronization issues, when the JavaScript code had to depend on which frame content was loaded first.