| Constructor and Description |
|---|
ModelFieldBean(String name,
ModelType type)
Creates a new ModelFieldBean with name and type
|
| Modifier and Type | Method and Description |
|---|---|
String |
getConvert() |
String |
getDateFormat() |
Object |
getDefaultValue() |
String |
getMapping() |
String |
getName() |
Boolean |
getPersist() |
ModelType |
getType() |
Boolean |
getUseNull() |
void |
setConvert(String convert)
function which coerces string values in raw data into the field's type
Typical use for a virtual field http://localhost/ext4.1/docs/index.html#!/api/Ext.data.Field-cfg-convert Property ' Ext.data.Field.convert' in JS. |
void |
setDateFormat(String dateFormat)
Specifies format of date.
|
void |
setDefaultValue(Object defaultValue)
The default value.
|
void |
setMapping(String mapping)
Typical use for a virtual field to extract field data from the model
object
Property 'mapping' in JS. |
void |
setName(String name)
Name of the field.
|
void |
setPersist(Boolean persist)
Prevent 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. |
void |
setType(ModelType type)
Type of the field.
|
void |
setUseNull(Boolean useNull)
If true null value is used if value cannot be parsed.
|
public String getName()
public void setName(String name)
name - new name for the fieldpublic ModelType getType()
public void setType(ModelType type)
type - new type for the fieldpublic Object getDefaultValue()
public void setDefaultValue(Object defaultValue)
defaultValue - new defaultValuepublic String getDateFormat()
public void setDateFormat(String dateFormat)
Will be ignored if the field is not a ModelType.DATE field.
dateFormat - new dateFormat Stringpublic Boolean getUseNull()
public void setUseNull(Boolean useNull)
Only used if type of field is ModelType.INTEGER,
ModelType.FLOAT, ModelType.STRING or
ModelType.BOOLEAN.
useNull - new value for useNullpublic String getMapping()
public void setMapping(String mapping)
mapping - A path expressionpublic Boolean getPersist()
public void setPersist(Boolean persist)
persist - defaults to true, only a false value will be generatedpublic String getConvert()
public void setConvert(String convert)
convert - A function. JavaScript Syntax example: function(v, record)
{ return ... ; }Copyright © 2010-2013. All Rights Reserved.