@Target(value={FIELD,METHOD,TYPE}) @Retention(value=RUNTIME) @Inherited @Documented public @interface ModelField
| Modifier and Type | Optional Element and Description |
|---|---|
String |
calculate
This config defines a simple field calculation function.
|
String |
convert
Function which coerces string values in raw data into the field's type
Typical use for a virtual field Property ' Ext.data.Field.convert' in JS. |
boolean |
critical
A critical field is a field that must always be sent to the server even if it has
not changed.
|
String |
customType
Type of the field.
|
String |
dateFormat
Specifies format of date.
|
String |
defaultValue
The default value.
|
String |
mapping
Typical use for a virtual field to extract field data from the model object
Property 'mapping' in JS. |
boolean |
persist
If set to false prevents the value of this field to be serialized or written with
Ext.data.writer.Writer
Typical use for a virtual field Property 'persist' in JS. |
ModelType |
type
Type of the field.
|
boolean |
useNull
If true null value is used if value cannot be parsed.
|
String |
value
Name of the field.
|
public abstract String value
If not present the name of the field is used.
public abstract ModelType type
If not present the library tries to figure out the type.
public abstract String customType
If not present the library tries to figure out the type.
If type() and customType() are present customType() has
precedence.
public abstract String defaultValue
Can be set to DEFAULTVALUE_UNDEFINED to set defaultValue to the value
undefined. This prevents defaulting a value.
public abstract String dateFormat
Will be ignored if the field is not a ModelType.DATE field.
public abstract boolean useNull
Only used if type of field is ModelType.INTEGER, ModelType.FLOAT,
ModelType.STRING or ModelType.BOOLEAN.
public abstract String mapping
public abstract boolean persist
Defaults to true
public abstract boolean critical
See Ext.data.field.FieldView#critical
Defaults to false
public abstract String convert
public abstract String calculate
Copyright © 2013-2014. All Rights Reserved.