From f0355f00d9a3c0ff4c098b0b5eae75ddc5593470 Mon Sep 17 00:00:00 2001
From: Renaud Le Gac <renaud.legac@free.fr>
Date: Wed, 23 Mar 2011 20:49:03 +0000
Subject: [PATCH] Load the store if it is not yet done.

---
 static/plugin_dbui/src/appgrid.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/static/plugin_dbui/src/appgrid.js b/static/plugin_dbui/src/appgrid.js
index 632f8f0a..7c1b7409 100644
--- a/static/plugin_dbui/src/appgrid.js
+++ b/static/plugin_dbui/src/appgrid.js
@@ -30,7 +30,10 @@ App.grid.Grid = Ext.extend(Ext.grid.GridPanel, {
         // initialize the underlying class. DON'T MOVE
         App.grid.Grid.superclass.initComponent.call(this);        
 
-        this.store.load();
+        // load the store if not yet done
+        if (this.store.getCount() === 0) {
+            this.store.load();    
+        }
 
     }
 });
-- 
GitLab