@Retention(value=RUNTIME) @Target(value=FIELD) @Documented @Inherited public @interface ViewParameter
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.
String
Number
sBoolean
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')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
|
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.
|
public static final char[] ILLEGAL_PARAMETER_NAME_CHARACTERS
public static final String DEFAULT_DATE_PATTERN
public static final String DEFAULT_PARAMETER_ENCODING
public abstract String value
public abstract boolean required
defaultValue()
is defined, an
error will be thrown.true
if parameter is required, false
(default) otherwisepublic abstract String defaultValue
According to parameter value type, a suitable String representation must be provided for default value:
.
(dot) charachter must be used as decimal separatortrue
and false
are admittedDEFAULT_DATE_PATTERN
Copyright © 2019 The Holon Platform. All rights reserved.