com.holonplatform.vaadin.navigator.annotations

## Annotation Type ViewParameter

-     @Retention(value=RUNTIME)
       @Target(value=FIELD)
       @Documented
       @Inherited
      public @interface ViewParameter

  Annotation to mark a `View` class field as view parameter holder, i.e. the field in which to inject a specific view navigation parameter.

  Parameter name can be specified using `value()`. If not setted (empty String), the parameter name is assumed to be the annotated field name.

  Supported parameter value types are:
  - `String`
  - `Number`s
  - `Boolean`
  - `Enum` (ordinal value must be used for enum values serialization)
  - `Date` using date format pattern `DEFAULT_DATE_PATTERN`
  - `LocalDate` using date format pattern ISO local date (yyyy-MM-dd)
  - `LocalTime` using date format pattern ISO local time (HH:mm:ss)
  - `LocalDateTime` using date format pattern ISO local date/time ('yyyy-MM-ddTHH:mm:ss')
  Since:
    4.0.0

- - ### Field Summary

    Fields
    Modifier and Type | Fields and Description
    --- | ---
    `static String` | `DEFAULT_DATE_PATTERN` Default Date parameter value serialization pattern
    `static String` | `DEFAULT_PARAMETER_ENCODING` Default parameters URI encode charset
    `static char[]` | `ILLEGAL_PARAMETER_NAME_CHARACTERS` Characters not admitted in parameter name

  - ### Optional Element Summary

    Optional Elements
    Modifier and Type | Optional Element and Description
    --- | ---
    `String` | `defaultValue` Default parameter value if no value is provided.
    `boolean` | `required` Declares this parameter as required.
    `String` | `value` Parameter name.

- - ### Field Detail

    - #### ILLEGAL_PARAMETER_NAME_CHARACTERS

          public static final char[] ILLEGAL_PARAMETER_NAME_CHARACTERS

      Characters not admitted in parameter name

  - - #### DEFAULT_DATE_PATTERN

          public static final String DEFAULT_DATE_PATTERN

      Default Date parameter value serialization pattern

  - - #### DEFAULT_PARAMETER_ENCODING

          public static final String DEFAULT_PARAMETER_ENCODING

      Default parameters URI encode charset

  - ### Element Detail

    - #### value

          public abstract String value

      Parameter name. If not setted (empty String), the parameter name is assumed to be the annotated field name.
      Returns:
        Parameter name
      Default:
        ""

  - - #### required

          public abstract boolean required

      Declares this parameter as required. If parameter is not provided and no `defaultValue()` is defined, an error will be thrown.
      Returns:
        `true` if parameter is required, `false` (default) otherwise
      Default:
        false

  - - #### defaultValue

          public abstract String defaultValue

      Default parameter value if no value is provided.

      According to parameter value type, a suitable String representation must be provided for default value:

      - For numeric values, `.` (dot) charachter must be used as decimal separator
      - For boolean values, only words `true` and `false` are admitted
      - For Enum values, String representation of enum ordinal index must be provided
      - For Date values, default value must be expressed using date format pattern `DEFAULT_DATE_PATTERN`
      Returns:
        Default parameter value, or an empty String for none
      Default:
        ""

Copyright © 2019 The Holon Platform. All rights reserved.