@Target(value=TYPE) @Retention(value=RUNTIME) @Inherited @Documented public @interface Model
| Modifier and Type | Optional Element and Description |
|---|---|
String |
createMethod
Specifies the create method.
|
String |
destroyMethod
Specifies the destroy method.
|
boolean |
disablePagingParameters
If set to true the pageParam, startParam and limitParam option of the
proxy will be set to undefined (Ext JS 4), false (Sencha Touch 2) or ''
(Ext JS 5).
|
String |
idProperty
Name of the id property.
|
String |
messageProperty
If set add to reader
|
boolean |
paging
If true a reader config with root : 'records' (Ext JS 4) or rootProperty
: 'records' (Sencha Touch 2 and Ext JS 5) will be added to the model
object.
|
String |
readMethod
Specifies the read method.
|
String |
rootProperty
If set a reader config with root : 'rootProperty' (Ext JS 4) or
rootProperty : 'rootProperty' (Sencha Touch 2 and Ext JS 5) will be added
to the model object.
|
String |
successProperty
If set add to reader
|
String |
totalProperty
If set add to reader
|
String |
updateMethod
Specifies the update method.
|
String |
value
"Classname" of the model.
|
String |
writer
If set add a writer property to the proxy.
|
public abstract String value
If not present full qualified name of the class is used.
public abstract String idProperty
If not present default value of 'id' is used.
public abstract boolean paging
reader : {
rootProperty : 'records'
}
Default value is false. To set a specific value to the root property use
rootProperty()public abstract boolean disablePagingParameters
proxy: {
type: 'direct',
pageParam: undefined,
startParam: undefined,
limitParam: undefined,
}
Default value is falsepublic abstract String readMethod
If only the readMethod is specified the generator will write the property directFn instead.
public abstract String createMethod
public abstract String updateMethod
public abstract String destroyMethod
public abstract String messageProperty
reader : {
messageProperty : 'your property name'
}
It is useful to add a customized message in case of error See Ext.data.reader.Reader#messagePropertypublic abstract String writer
proxy: {
type: 'direct',
writer: 'mywriter'
}
See Ext.data.proxy.Proxy#writerpublic abstract String successProperty
reader : {
successProperty : 'success'
}
See Ext.data.reader.Reader#successProperty
If not present default value 'success' is used.
public abstract String totalProperty
reader : {
totalProperty : 'total'
}
See Ext.data.reader.Reader#totalProperty
If not present default value 'total' is used.
public abstract String rootProperty
reader : {
rootProperty : 'rootProperty'
}
If paging() and rootProperty() are present
rootProperty() has precedence.
Copyright © 2013-2014. All Rights Reserved.