PDA

View Full Version : [FIXED] [2.0 final] EditorGrid reconfigure Bug



micgala
10 Jul 2009, 12:00 AM
Hi.

There is a problem when i try to use the reconfigure in a EditorGrid, and after that I try to edit a cell.

This is a test case. For getting the problem, click in the button for reconfiguring and adding an entry to the grid. Then try double clicking in a cell for editing. (Make sure the double click event in the cell is triggered!)
You will get a ArrayIndexOutOfBoundsException.



public void onModuleLoad() {

Window window = new Window();
window.setLayout(new FitLayout());
window.setSize(400, 300);

final ListStore<BaseModel> store = new ListStore<BaseModel>();
ColumnConfig test = new ColumnConfig("id", "Test", 200);
ColumnModel columnModel = new ColumnModel(Arrays.asList(test));

final EditorGrid<BaseModel> grid = new EditorGrid<BaseModel>(store, columnModel);
grid.setClicksToEdit(ClicksToEdit.TWO);

window.add(grid);
window.addButton(new Button("Add Data & Reconfigure", new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
ColumnConfig name = new ColumnConfig("name", "Name", 200);
ColumnConfig value = new ColumnConfig("value", "Value", 200);
ColumnModel columnModel = new ColumnModel(Arrays.asList(name, value));

BaseModel model = new BaseModel();
model.set("name", "Test");
model.set("value", "Value Test");

BaseModel model1 = new BaseModel();
model1.set("name", "Test1");
model1.set("value", "Value Test1");
store.add(model);
store.add(model1);

grid.reconfigure(store, columnModel);
}
}));
window.show();
}

Thanks for looking into this.

Regards,
Michel.

sven
10 Jul 2009, 7:48 AM
Fixed in SVN.

micgala
12 Jul 2009, 11:53 PM
Thanks Sven.

jaf
21 Jul 2009, 6:58 AM
Fixed in SVN.
Can you please point me at where to go to get the latest SVN build from? Is it publicly available?

sven
21 Jul 2009, 6:59 AM
SVN access is available with a support subscription: http://www.extjs.com/store/gxt/#support-table