Class JsonReaderResponse<T>
java.lang.Object
ch.tocco.nice2.netui.api.dwr.extstore.JsonReaderResponse<T>
- Type Parameters:
T
- Type of Objects that will be converted to Ext.data.Records by the client-side Ext.data.DataReader.
Deprecated.
Creates a response that can be consumed by an Ext.data.JsonReader.
The client-side Ext.data.JsonReader must have the "root" property set to "objectsToConvertToRecords".
Note: Ext documentation often uses "rows" for this property, but "objectsToConvertToRecords" is more clear.
Example Ext.data.JsonReader configuration:
{
root : 'objectsToConvertToRecords'
}
If the parameterized type has two properties "field1" and "field2", then when an instance of this class is read by the client,
it will look like:
{
objectsToConvertToRecords : [
{
field1 : 'value',
field2 : 'value',
}, {
field1 : 'value',
field2 : 'value',
}
],
success : true
}
-
Constructor Summary
ConstructorDescriptionDeprecated.Creates an unsuccess
ful JsonReaderResponse with nullobjectsToConvertToRecords
.JsonReaderResponse
(List<T> objectsToConvertToRecords) Deprecated.Creates asuccess
ful JsonReaderResponse with the providedobjectsToConvertToRecords
.Deprecated.JsonReaderResponse
(List<T> objectsToConvertToRecords, Map<String, Object> properties, @Nullable Integer total) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Object[]
Deprecated.Deprecated.boolean
Deprecated.@Nullable Integer
getTotal()
Deprecated.void
setMetaData
(MetaData metaData) Deprecated.Adds the meta data object to the json reader response.
-
Constructor Details
-
JsonReaderResponse
Deprecated.Creates asuccess
ful JsonReaderResponse with the providedobjectsToConvertToRecords
.- Parameters:
objectsToConvertToRecords
- items
-
JsonReaderResponse
Deprecated. -
JsonReaderResponse
public JsonReaderResponse(List<T> objectsToConvertToRecords, Map<String, Object> properties, @Nullable @Nullable Integer total) Deprecated. -
JsonReaderResponse
public JsonReaderResponse()Deprecated.Creates an unsuccess
ful JsonReaderResponse with nullobjectsToConvertToRecords
. This signals the case where the client established a connection with the server, but the server couldn't fulfill it (e.g., user doesn't have proper user credentials).
-
-
Method Details
-
setMetaData
Deprecated.Adds the meta data object to the json reader response. Adding meta data can be used to reconfigure the column model dynamically.- Parameters:
metaData
- the meta data object.
-
getSuccess
public boolean getSuccess()Deprecated. -
getObjectsToConvertToRecords
Deprecated. -
getProperties
Deprecated. -
getMetaData
Deprecated. -
getTotal
Deprecated.
-