Documentation Archive Developer
Search
PATH  Documentation > WebObjects 4.5 > WebObjects Developer's Guide


Table of Contents Previous Section

Subcomponents and Component References

A "node" in a template's object graph can represent a subcomponent (also called a reusable component) as well as a dynamic or static HTML element. A dynamic element called a component reference represents all occurrences of the subcomponent in the parent component. At run-time, the component reference binds itself to the separate instances. Figure 30 is an example of an object graph for a page with a subcomponent.

A subcomponent can fire actions against its parent component (using performParentAction:), and if the parent's state changes, its state is synchronized accordingly. In other words, its state is updated to reflect changes according to its bindings with the parent.

An element ID is assigned to each instance of a subcomponent. When a request-handling message traverses an object graph and reaches the component reference, it resolves references to its instances according to the element ID of each instance.

Figure 30. An Object Graph for a Page With a Subcomponent

Table of Contents Next Section