Component-Level Processing

Component-level processing affects the whole component, and typically involves saving all data in the component, retrieving data into the component, and printing the visible data.

If no operation is specified when a component is activated, the code in the exec operation is processed. The exec operation is the component's default operation and is represented in the component signature. It determines what happens first when a component is run.

In user interface components, it should contain the ProcScript that determines what happens before the user actually sees a component on the screen. For example, it can be used to retrieve data into the component before it is displayed to the user.

All other processing at the component level is based on single events that affect everything in the component. These events can include:

  • Instructions from the user (such as closing the component, clicking on a modal component to give it focus)
  • ProcScript instructions (such as setformfocus)
  • Asynchronous messages received from other components

Cascading Processing

Many events occurring in triggers at component level have a cascading effect for the next level down (the entity level), which in turn can have a cascading effect for the next level down (the field level). This is because most events that happen at component level have a direct effect on the entities in the component.

For example, the retrieve trigger is found at component level. When it is fired, the retrieve statement it contains activates the entity-level read triggers for each occurrence in the component.

Because most events that happen at component level have a direct effect on the entities represented in the component, you must be able to influence the processing for each component entity. Where relevant, for each entity, you must be able to influence the processing for each component field.

Related Topics