Clear Up
SharpKit Reference

ReaderConfig Class


Base Types



Name Description


Name Description
idProperty Name of the property within a row object that contains a record identifier value. Defaults to the id of the model. If an idProperty is explicitly specified it will override the idProperty defined on the model.
implicitIncludes True to automatically parse models nested within other models in a response object. See the intro docs for full explanation. Defaults to: true
listeners A config object containing one or more event handlers to be added to this object during initialization. This should be a valid listeners config object as specified in the addListener example for attaching multiple handlers at once. DOM events from Ext JS Components While some Ext JS Component classes export selected DOM events (e.g. "click", "mouseover" etc), this is usually only done when extra value can be added. For example the DataView's itemclick event passing the node clicked on. To access DOM events directly from a child element of a Component, we need to specify the element option to identify the Component property to add a DOM listener to:
new Ext.panel.Panel({
            width: 400,
            height: 200,
            dockedItems: [{
            xtype: 'toolbar'
            listeners: {
            click: {
            element: 'el', //bind to the underlying el property on the panel
            fn: function(){ console.log('click el'); }
            dblclick: {
            element: 'body', //bind to the underlying body property on the panel
            fn: function(){ console.log('dblclick body'); }
messageProperty The name of the property which contains a response message. This property is optional.
readRecordsOnFailure True to extract the records from a data packet even if the successProperty returns false. Defaults to: true
root The name of the property which contains the data items corresponding to the Model(s) for which this Reader is configured. For JSON reader it's a property name (or a dot-separated list of property names if the root is nested). For XML reader it's a CSS selector. For Array reader the root is not applicable since the data is assumed to be a single-level array of arrays. By default the natural root of the data will be used: the root JSON array, the root XML element, or the array. The data packet value for this property should be an empty array to clear the data or show no data. Defaults to: ""
successProperty Name of the property from which to retrieve the success attribute, the value of which indicates whether a given request succeeded or failed (typically a boolean or 'true'|'false'). See for additional information. Defaults to: "success"
totalProperty Name of the property from which to retrieve the total number of records in the dataset. This is only needed if the whole dataset is not passed in one go, but is being paged from the remote server. Defaults to: "total"
© Copyright 2005-2011 SharpKit. All rights reserved.