Embedded Components

Under Tapestry, it is common to define new components by combining existing components. The existing components are embedded in the containing component. This is always true at the top level; Pages, which are still Tapestry components, always embed other Tapestry components.

Each embedded component has an id (an identifying string) that must be unique within the containing component. Every non-page component is embedded inside some other component forming a hierarchy that can get quite deep (in real Tapestry applications, some pages have components nested three to five levels deep).

In some cases, a component will be referenced by its id path. This is a series of component ids separated by periods, representing a path from the page to a specific component. The same notation as a property path is used, but the information being represented is quite different.

For example, the id path border.navbar.homeLink represents the component named homeLink, embedded inside a component named navbar, embedded inside a component named border, embedded inside some page.

Tapestry components are "black boxes". They have a set of parameters that may be bound, but their internals, how they are implemented, are not revealed.

Primitive components may not embed other components, or even have a template. Nearly all the built-in components are primitive; they are building blocks for constructing more complex components.

Alternately, a component may be implemented using a template and embedded components. In either case, the names, types or very existence of embedded components is private, hidden inside the containing component's "black box".