sjivan / gwt-ext

Automatically exported from code.google.com/p/gwt-ext
0 stars 0 forks source link

GridPanel Reconfigure Bug (after upgrade to 2.0.5) #410

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
From forum:
http://gwt-ext.com/forum/viewtopic.php?f=8&t=2715

Summary:
I updated to Gwt-Ext 2.0.5 and noticed a serious problem when I was testing 
my application.

I have a simple Double click handler that returns the id of the row 
Code:
      mailboxGrid.addGridRowListener(new GridRowListenerAdapter() {
         public void onRowDblClick(GridPanel grid, int rowIndex,
               EventObject e) {
            Record selected = grid.getStore().getAt(rowIndex);
                controller.pmfSelected(new 
Long(selected.getAsString("pmfID")));
         }
      });

The grid that this is attached to has multiple stores that I switch between 
depending on the state of a TreePanel (think email inboxes) 
Code:

lblFolderName.setText(AppModel.constants().treeApprovalRequired());
         mailboxGrid.reconfigure(mailboxStore.getApprovalStore(), 
columnModel);         
         centerPanel.setTitle(AppModel.constants().treeApprovalRequired());

When I double click on a row, it gets the correct rowIndex, but the store 
returned by grid.getStore() is always the one it was initially loaded with, 
not the reconfigured store. This causes all manner of mayhem in the code. 
My in-expert opinion is that the GridPanel object being passed in the 
listener is not being updated when reconfigure is called.

Original issue reported on code.google.com by mlim1...@gmail.com on 10 Sep 2008 at 4:04

GoogleCodeExporter commented 8 years ago
This is due to fix done by Issue 393.

Original comment by mlim1...@gmail.com on 10 Sep 2008 at 4:05

GoogleCodeExporter commented 8 years ago
The local store is updated upon reconfigure.  Also, the getStore returns from 
Extjs 
and then locally if none is found.

Original comment by mlim1...@gmail.com on 10 Sep 2008 at 4:10