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 public class JsonReaderResponse<T> extends Object
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 Details

    • JsonReaderResponse

      public JsonReaderResponse(List<T> objectsToConvertToRecords)
      Deprecated.
      Creates a successful JsonReaderResponse with the provided objectsToConvertToRecords.
      Parameters:
      objectsToConvertToRecords - items
    • JsonReaderResponse

      public JsonReaderResponse(List<T> objectsToConvertToRecords, Map<String,Object> properties)
      Deprecated.
    • JsonReaderResponse

      public JsonReaderResponse(List<T> objectsToConvertToRecords, Map<String,Object> properties, @Nullable @Nullable Integer total)
      Deprecated.
    • JsonReaderResponse

      public JsonReaderResponse()
      Deprecated.
      Creates an unsuccessful JsonReaderResponse with null objectsToConvertToRecords. 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

      public void setMetaData(MetaData metaData)
      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

      public Object[] getObjectsToConvertToRecords()
      Deprecated.
    • getProperties

      public Map<String,Object> getProperties()
      Deprecated.
    • getMetaData

      public MetaData getMetaData()
      Deprecated.
    • getTotal

      @Nullable public @Nullable Integer getTotal()
      Deprecated.