Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: More content copied from 5.1 trunk (per TAP5-1217 "merge in documentation from trunk")

...

Exception: A mixins whose class is annotated with @MixinAfter is ordered after the component, not before.

Withing a given phase and class (@MixinAfter vs. mixin before), mixin ordering is determined by the ordering constraints specified in the mixin definitions. The constraint definitions follow the same conventions as ordered service configurations. How you specify the constraints depends on how the mixin is specified.

Code Block
titleAs an Implementation Mixin

  @Mixin("Autocomplete",order={"before:DiscardBody","after:RenderDisabled"}
  private TextField userId;
Code Block
xml
xml
titleAs a Template-specifed Instance Mixin

  <input t:id="myfield" t:mixins="autocomplete::before:discardbody;after:renderdisabled,
          defaultfromcookie::before:autocomplete"/>
Code Block
titleAs a @Mixins-specified Instance Mixin

  @Component(...)
  @Mixins("Autocomplete::before:discardbody;after:renderdisabled","DefaultFromCookie::before:autocomplete"))
  private TextField userId;
Code Block
titleAs a @MixinClasses-specified Instance Mixins

  @Component(...)
  @MixinClasses(value={Autocomplete.class,DefaultFromCookie.class},
                order={"before:discardbody;after:renderdisabled","before:autocomplete")

The ordering is always specified in terms of the order of the "forward" rendering process (setupRender, beginRender, etc.). When the "reverse" rendering phases (afterRender, etc.) occur, the mixin order is exactly reversed. Mixins which have no associated ordering constraints will be ordered in a manner which is consistent with the specified constraints for all other mixins, but is otherwise unspecified.

Available Mixins

Include Page
TAPESTRY:Built-in Mixins
TAPESTRY:Built-in Mixins

...