10 Understanding Parent/Child Browse Forms

This chapter contains the following topics:

10.1 Parent/Child Browse Forms

Similar to find/browse forms, parent/child browse forms are used to query business views (BVs) and select records from BVs for operations. However, instead of a default grid control, parent/child browse forms contain a default parent child control instead.

10.2 Parent/Child Browse Events

These events can occur on the parent/child browse form during runtime:

  • Dialog is Initialized

  • Post Dialog is Initialized

  • Grid Record is Fetched

  • Write Grid Line-Before

  • Write Grid Line-After

  • Last Grid Record Has Been Read

  • XAPI Subscribe Event

  • End Dialog

10.3 Parent/Child Browse Runtime Processing

This section discuses how runtime processes parent/child browse forms.

10.3.1 Dialog Initialization

When a parent/child browse form is called, runtime initializes these items in this order:

  1. Thread handling

  2. Error handling process

  3. Business view columns (BCs)

  4. Form controls (FCs)

  5. Grid fields

  6. Static text

  7. Helps

  8. Event rules (ER) structures

This flowchart illustrates the tasks that runtime performs after initializing these objects to complete dialog initialization:

Figure 10-1 Parent/Child browse dialog initialization

Description of Figure 10-1 follows
Description of ''Figure 10-1 Parent/Child browse dialog initialization''

Data selection and sequencing occurs at the control level and ultimately leads to the population of the parent/child control, provided runtime encounters no errors.

10.3.2 Find Button

The Find button is a standard button on parent/child forms that appears by default. When the user clicks it, runtime fires the Button Clicked event. If no errors exist in the filter fields, runtime performs data selection and sequencing for the grid and tree controls. After reloading the grid and tree with the fetched data, runtime fires the Post Button Clicked event.

10.3.3 Select Button

Select is a standard item that is automatically placed on parent/child browse forms. No default processing exists for Select on parent/child browse forms. It acts as a user-defined item.

10.3.4 Close Button

The Close button is a standard button on parent/child forms that appears by default. When the user clicks it, runtime fires the Button Clicked and Post Button Clicked events in immediate succession. If no errors occur, runtime attempts to close all of the modeless child forms, if any exist. If any of these child forms cannot be closed, the Close button process is terminated. Otherwise, runtime fires the End Dialog event and initiates the dialog close process.

10.3.5 Dialog Close

Parent/Child can be closed either by the user (typically by clicking the Close button) or by the system. After performing any control-level close processing that might need to occur, runtime closes the form. If the event has not already occurred, runtime fires the End Dialog event. Then it performs these tasks in this order:

  1. Load form interconnect data from BCs for database commit.

  2. Terminate error and thread handling.

  3. Terminate helps.

  4. Free all form structures.

  5. Destroy the window.