Workbench User Guide : Generating Frames from Predefined Templates : The mastdetl Templates : The detail Template
 
Share this page          
The detail Template
The detail frame template is used to generate a frame that binds a database query that exists with a one-to-many master-detail entity relationship with the detail table field associated with calling frames generated from the table_field, master_detail, or detail frame templates.
Although similar in appearance to frames generated from the master_detail frame template, detail frames perform only one query.
Note:  Frames generated from this template can call frames generated from the detail or explosion frame templates.
Create a Detail Frame
You can create a detail frame using the detail frame template.
To create a frame using the detail frame template
1. On the Develop tab, select the application in which you want to create the frame in the Applications portlet, and then select the header bar of the Components portlet to make it active.
2. Click File, New, User Frame.
The Create User Frame dialog appears.
3. Enter the component name in the Name field (for example, My_Detail_Frame).
4. (Optional) Enter a comment for the component in the Remark field.
5. Select mastdetl from the Application list and the detail template from the Template list.
6. Click Create.
The Select a Parent Frame dialog appears.
7. Specify the detail frame's parent frame by selecting an application and a frame from the Application and Frame list fields, respectively, and then click OK.
The Select Database Object dialog appears.
8. Enter the name of a detail table in the Detail field of this dialog.
For more information about using the control button to the right of the entry field to specify a table, see Table Selection Dialog.
9. Click OK.
The Frame Assistant appears.
10. Click the join icon in the query display area.
11. Before generating the detail frame, you must define one or more join columns between the two tables. Then click Insert to create a join.
A line is drawn between the two columns indicating the join.
For more information, see How You Can Define Join Column Properties.
12. Using the Frame Assistant, you can optionally specify additional tables, including lookup or associate tables. You can also select query expressions, query properties, and display properties for result columns.
For more information, see:
How You Can Set Query Expressions)
How You Can Set Query Properties)
How You Can Set Display Properties)
Add Additional Tables to a Generated Frame)
13. Click Generate.
The detail frame is created and displayed in the Frame Editor.
Note:  An Open Row and an Open List button are provided in the detail section of the frame in the Frame Editor. They will appear in the running frame only if the detail frame is selected as the parent frame for either an explosion or a detail frame (see Create an Explosion Frame).
14. (Optional) Specify the frame's properties using the Property Inspector. For example, set the IsResizeable property to TRUE.
For more information about using the Property Inspector, see Set Frame Properties.
Use a Detail Frame
The generated detail frame displays a master and a detail section. The master section of a detail frame is used to display a single row passed to it from a calling frame's detail table field. It consists of a set of VCR buttons and a slider to navigate through each selected row, with its values updated automatically in a matrix of fields. Each field is mapped by name and type to the columns of the parent frame's table field.
The detail section of a detail frame is used to display the rows of a second query of one or more joined tables that are associated with the detail query of the calling frame. It contains a table field, each of whose columns maps by name and type to the result columns of the detail frame's query.
To see the detail frame in operation
1. In the Frame Editor, open the parent frame with which it is associated.
2. Click Debug, Go on the floating menu bar.
3. Highlight a row in the detail table, and then click Open List to display the detail frame.
Note:  The VCR buttons are not present if the parent is a master-detail frame running in asynchronous mode.
The Row menu provides commands to perform standard database row operations such as inserting a new row, duplicating the current row, finding text, copying the table, and saving changes to the table. For more information about finding text or copying a table, see Use a Table Field Frame.