[Users] help: WMSCapabilitiesStore and grid update

geographika geographika at gmail.com
Thu Jan 20 17:59:23 CET 2011


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
> Users at geoext.org
> 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-0001.htm 


More information about the Users mailing list