Annotation Interface Supply


@Documented @Retention(RUNTIME) @Target(METHOD) public @interface Supply
Annotation for declarative supply methods in UI controllers. The value returned by a supplier is passed as an input parameter to the method defined in subject().

In the example below, the returned TextRenderer instance is used as an input parameter for Grid.Column.setRenderer(Renderer):


 @Supply(to = "fooDataGrid.name", subject = "renderer")
 private Renderer<Foo> nameRenderer() {
     return new TextRenderer<>(Foo::getName);
 }
 
  • Element Details

    • target

      Target target
      Returns:
      type of target
      Default:
      COMPONENT
    • type

      Class<?> type
      Returns:
      type of object to supply, can be used instead of subject()
      Default:
      java.lang.Object.class
    • subject

      String subject
      Returns:
      property name that will be set using annotated method
      Default:
      ""
    • to

      String to
      Returns:
      id or path to target object
      Default:
      ""
    • required

      boolean required
      Declares whether the annotated dependency is required.

      Defaults to true.

      Default:
      true