Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Fix broken cwiki-test images

...

The rendering of each component is divided into a number of phases, illustrated below.

Image AddedImage Removed
Each of the orange phases (SetupRender, BeginRender, BeforeRenderBody, etc.) corresponds to an annotation you may place on one or more methods of your class. The annotation directs Tapestry to invoke your method as part of that phase.

...

All Render phase methods are optional; a default behavior is associated with each phase.

Annotation

Method Name

When Called

@SetupRender

setupRender()

When initial setup actions, if any, are needed

@BeginRender

beginRender()

When Tapestry is ready for the component's start tag, if any, to be rendered

@BeforeRenderTemplate

beforeRenderTemplate()

Before Tapestry renders the component's template, if any

@BeforeRenderBody

beforeRenderBody()

Before Tapestry renders the body of the component, if any

@AfterRenderBody

afterRenderBody()

After Tapestry renders the body of the component, if any, but before the rest of the component's template is rendered

@AfterRenderTemplate

afterRenderTemplate()

After Tapestry finishes rendering the component's template, if any

@AfterRender

afterRender()

After Tapestry has finished rendering both the template and body of the component

@CleanupRender

cleanupRender()

When final cleanup actions, if any, are needed

The large number of phases reflects the need for precise control of components from component mixins. Several of the phases exist almost exclusively for mixins.

...