added debug mode

This commit is contained in:
Sebastian Sdorra
2010-09-05 16:41:28 +02:00
parent a8eb96e06a
commit 2973b80a6b
3 changed files with 19 additions and 5 deletions

View File

@@ -9,12 +9,15 @@ Sonia.rest.JsonStore = Ext.extend( Ext.data.JsonStore, {
constructor: function(config) {
var baseConfig = {
autoLoad: true,
autoLoad: false,
listeners: {
// fix jersey empty array problem
exception: {
fn: function(proxy, type, action, options, response, arg){
if ( action == "read" && response.responseText == "null" ){
if ( action == 'read' && response.responseText == 'null' ){
if ( debug ){
console.debug( 'empty array, clear whole store' );
}
this.removeAll();
}
},