These frames play an identical role to frames with FrameType 1008, as they hold custom JavaScript for a component. The distinguishing features between the two FrameTypes are outlined in Table 12.
Table 12. Component Frames
Dashboard Studio components are dashboards with FrameType 1020. One or more sections may be required for the component to function correctly. These must be packaged in the Interactive Reporting document with the component if it is to be distributed.
Components have the advantage of being able to be inserted into other templates with the Dashboard Studio Merge Utility. The Dashboard Studio template framework recognizes these components and automatically includes their services. See Using the Merge Tab.
When the document starts up, the template framework looks for sections with FrameType 1020, and it causes the OnClick() event of every CommandButton in that section. This event causes all functions in these CommandButtons to become instantiated as properties of the dashboard, provided they contain JavaScript of the form:
var mySection=this.Parent function myFunction(myParams){ // the code of the function } mySection.myFunction=myFunction
When a control on a frame is clicked, the handler is invoked.
The discovery and recognition of the control is based on the control name or the contents of txlClass or the section name with FrameType 1020. The format of these controls is <controlId>^<SectionName>.
Section = XyzAmortize, FrameType=1020 Control (on a user frame) = picDoAmort^XyzAmortize
When a control is clicked, the generic control handler looks for a list of known controls. If the control is not found, the control name is split on the (^), and a section of FrameType 1020 with an identical suffix is used.
If the control cannot be split or if the 1020 section cannot be located, the generic handler looks for a section based on the content of txlClass.
Section = XyzAmortize, FrameType=1020 Control (on a user frame) = picDoAmortize txlClass = XyzAmortize
The two techniques enable you to provide access to a component:
In general, to enhance the functionality or refine the business rules of a core framework button, code must be added to the button to be refined in a frame of type 1008. However, to create substantial, freestanding functionality that must be used across multiple templates, a component (FrameType = 1020) should be created. Also see Dashboard Development Services Components.