Tapestry pages are specialized root level components in the component hierarchy that can only serve as containers for other components and can never be embedded within another component.
In Tapestry, all dynamic parts of a web page are isolated into components that can be dynamically configured via parameters. Pages simply act as containers that configures and aggregates these components and weaves the HTML to be rendered in the browser. Hence pages do not have parameters.
Embedded components render within the context of the containing component, and ultimately within the containing page. The containing page acts as a window for its embedded components to reach out to the rest of the application. This is made possible by providing a reference, to the containing page, to every component embedded in the page.
![]() | Tip |
|---|---|
| page is a special property of AbstractComponent that holds the reference to the containing page. | |
Page speicifications are defined in XML, similar to component specifications, as shown below.
<page-specification |
| The root element of a page specification. It identifies the defining component as a page component, meaning not embeddable. |
| The page class. This class is one of either the framework class, BasePage, or a user-defined subclass of BasePage. |