
/**
 * @class Ext.data.JaxerStore
 * @extends Ext.data.Store
 * An example DataStore implementation showing how easy it is 
 * to work with Jaxer's database, especially since it natively 
 * returns json.  Automatically Creates a JsonReader and JaxerProxy
 * that are configured to deal with the server-proxy function.
 * @cfg {String} root Is always set to 'rows' since this is what 
 * Jaxer returns
 * @cfg {String} table (required) The mysql table name to pull from
 * @cfg {Array} fields (required) An Array of field definition objects
 */
Ext.data.JaxerStore = function(config) {
  var params = Ext.apply({ fields: config.fields, table: config.table }, config.baseParams || {});
  
	Ext.data.JaxerStore.superclass.constructor.call(this, Ext.applyIf(config, {
    reader: new Ext.data.JsonReader(Ext.apply({
      root: 'rows'
    },config.readerConfig),config.fields)
	}));
  ExtJaxerProxyAsync(this.loadData.createDelegate(this), params);
};
Ext.extend(Ext.data.JaxerStore, Ext.data.Store);