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

...

Scrollbar

...

Injection in Detail

...

Injection in Tapestry IoC can be a complicated subject for a number of reasons:

  • Injection can occur in many places: on fields, and on parameters to methods and constructors of certain objects.
  • Parts of Injection are themselves defined in terms of Tapestry IoC services, many of which are extensible.
Div
stylefloat:right
titleRelated Articles
classaui-label
Content by Label
showLabelsfalse
showSpacefalse
titleRelated Articles
cqllabel = "injection" and space = currentSpace()

Despite this, injection generally Just Works: most of the time, you want Tapestry to inject a service, and only a single service implements the service interface.

...

As a chain-of-command, each of the following ObjectProviders will be considered and will attempt to identify the object to be injected.

Note
the service

Value ObjectProvider

Checks for the presence of the @Value annotation. If present, then the annotation's value is evaluated (to expand any symbol references), and the TypeCoercer service is used to convert the resulting String to the injection type (the field or parameter type).

...

You may use the @InjectService annotation on component fields.

 

Scrollbar