Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

Injection

...

Injection is Tapestry's way of making a dependency – such as a resource, asset, component, block or service – available in a page, component, mixin or service class.

...

Injection is a key concept in Tapestry, and it is used in several different but related ways, listed below.

Injection in Tapestry IOC Services

Main Article: Tapestry IoC Overview Injection in Detail

The Tapestry IoC container makes use of injection primarily through constructors and via parameters to service builder methods.

...

For field type Block, the value of the Inject annotation is the id of the <t:block> element within the component's template. Normally, the id of the block is determined from the field name (after stripping out any leading "_" and "$" characters):

...