I'm trying to build a ExtJs web application. There is a window for user maintenance,a grid is in the window to show user's role. A store links to the grid. I configure all of them in Sencha Architect, so I didn't write any code manually.
But something very interest happens. When I open the same window twice or more. If one grid contains data, they also show in all other opened window. Data is also updated altogether if I update in one window.
Store's data comes from a servlert by using a proxy and xmlreader. Is there anything I missed in grid or store configuration? Or I need to load the store manually when the window is created? Kindly help , thanks
I think your issue is that all of the windows are using the same store.
What you probably want to do is use a new store for each window, with each store using the same model.
Another approach would be to only allow one window to be open at a time (make the window model when you create it). That way, you can control the store contents on a per window basis.
To make a window modal, in the Controller where you launch the new window, use constrain : true, like this (do not put 'constrain : true' in the View def for this window, put it here, when launching the window):
onChooseNewIpAddress : function (button) {
// Launch the get new ip window.
Ext.create('Portal.view.GetNewIp', {
title : 'Get New IP',
constrain : true
}).show();
}
David