[Users] help: WMSCapabilitiesStore and grid update

Amini, Manouchehr Manouchehr.Amini at eawag.ch
Thu Jan 20 16:13:39 CET 2011


Dear Users

I have a gridpanel with a WMSCapabilitiesStore in a windows that is fired when a button is pressed. At the moment it works fine only the the first time I push the button. The problem is that when I push that button again I get exactly the same grid and store, though I change the url of WMS store every time.   How can I get the grid and its store updated with new data?
Here is the piece of code I use within a function:

###
function myfunc() {
                var uid = Ext.getDom('userid').title;
             win = new Ext.Window({
                    width: 400,
                    height: 400,
                    layout: 'fit',
                    closeAction: 'destroy',
                    closable: true,
                                 });


     var url="http://localhost:8080/geoserver/wms?service=wms&version=1.1.1&request=GetCapabilities&namespace=" + uid;
      mystore=new GeoExt.data.WMSCapabilitiesStore({});
               mystore.proxy.setUrl(url);
               mystore.proxy.setApi(Ext.data.Api.actions.read, url);
               mystore.reload()

                mygrid=new Ext.grid.GridPanel({
                //title: "Available Layers",
                region: 'center',
                store: mystore,
                    .......
                    .......});
            win.add(mygrid);
            win.doLayout();
             win.show();
}
###

Any advice?


Manouchehr

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20110120/4d9c71e5/attachment-0001.htm 


More information about the Users mailing list