Hi Seth Thank you for your reply. I checked the function in the FF and It shows an empty grid. I could not figure out what is wrong with it.
In fact I use exactly the same url to retrieve the layers from a specific namespace every time I fire the function, but I expect different results. As I change the layers of that namespace (add or remove layers). I also tried to create store in a different function, it didn't work. Any further suggestion? Thanks Manouchehr ------------------------------ Message: 4 Date: Thu, 20 Jan 2011 17:59:23 +0100 From: geographika <[email protected]> Subject: Re: [Users] help: WMSCapabilitiesStore and grid update To: [email protected] Message-ID: <[email protected]> Content-Type: text/plain; charset="iso-8859-1" Hi, Check with FIreBug or Fiddler that you are calling a different URL each time - and that results should be different. If this is the case, are you refreshing your grid? I have working code to update a store's URL and parameters as follows: this.store.proxy.setUrl(url, true); if (paramsObj) { this.store.reload({ params: paramsObj }); } Regards, Seth http://geographika.co.uk On 20/01/2011 16:13, Amini, Manouchehr wrote: > 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 > > <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 > > > _______________________________________________ > Users mailing list > [email protected] > http://www.geoext.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.geoext.org/pipermail/users/attachments/20110120/287e3098/attachment.htm ------------------------------ _______________________________________________ Users mailing list [email protected] http://www.geoext.org/cgi-bin/mailman/listinfo/users End of Users Digest, Vol 24, Issue 23 ************************************* _______________________________________________ Users mailing list [email protected] http://www.geoext.org/cgi-bin/mailman/listinfo/users
