Annotation Interface WebJarResource


@Retention(RUNTIME) @Target(TYPE) public @interface WebJarResource
This annotation enables to declare web resource dependencies for the annotated ClientConnector.

To declare such dependency you should use the following template: "webJarName:resource".

Example: "jquery:jquery.min.js"

To override web resources, that was previously referenced by this annotation, put new files in the following path: VAADIN/webjars/webJarName/webJarVersion/pathToResource.

Example: VAADIN/webjars/jquery-ui/1.12.1/jquery-ui.min.js

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Web resources to load before initializing the client-side connector.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    A path that will be used while resolving resource from a file system.
  • Element Details

    • value

      String[] value
      Web resources to load before initializing the client-side connector.
      Returns:
      an array of WebJar resource identifiers
    • overridePath

      String overridePath
      A path that will be used while resolving resource from a file system.
      Returns:
      override path
      Default:
      ""