Annotation Type Include


  • @Retention(RUNTIME)
    @Target(METHOD)
    @Documented
    public @interface Include
    Deprecated.
    Template model and polymer template support is deprecated - we recommend you to use LitTemplate instead. Read more details from the Vaadin blog. For lit templates, you can use @Id mapping and the component API or the element API with property synchronization instead.
    Defines which properties to include when importing a bean into a template model.

    Use this annotation on bean setters in your TemplateModel class to restrict which properties of the beans are imported into the model.

    You can only define exact matches using this filter. If you need more control, you can use TemplateModel.importBean(String, Object, java.util.function.Predicate) and define a custom filter.

    Note that @Include annotations are not inherited.

    Since:
    1.0
    See Also:
    Exclude
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      String[] value
      Deprecated.
      Properties to include from a bean when importing into a template model.
    • Element Detail

      • value

        String[] value
        Deprecated.
        Properties to include from a bean when importing into a template model.

        By default all properties are included.

        Returns:
        the properties to include from a bean when importing into a template model