Hi Mario,
Here's a way of doing it :
store.proxy.setUrl(url);
store.proxy.setApi(Ext.data.Api.actions.read, url);
store.load();
I had the same problem while developing a WMSBrowser widget :
[example]
http://dev.geoext.org/sandbox/mapgears/geoext.ux/ux/WMSBrowser/examples/WMSBrowserInWindowExample.html
[source]
http://dev.geoext.org/sandbox/mapgears/geoext.ux/ux/WMSBrowser/lib/GeoExt.ux/widgets/WMSBrowser.js
Regards,
Alexandre
Mario Nuñez Jimenez wrote:
> I already did it but not in a good way.
> I made a new store and a new gris, then I set the store into the gris and
> then I have to manage with refreshing the panel containing the gris but I
> dont want to do it this way.
> What I am trying is to update the store only changing the url and also
> refresh the gris to show the new data... is not posible?
>
> -----Original Message-----
> From: Eric Lemoine [mailto:[email protected]]
> Sent: viernes, 21 de mayo de 2010 13:15
> To: Mario Nuñez Jimenez
> Cc: [email protected]
> Subject: Re: [Users] Ext.grid.GridPanel and GeoExt.data.WMSCapabilitiesStore
> reload data
>
> 2010/5/21 Mario Nuñez Jimenez <[email protected]>:
>
>> Hello list,
>>
>> I am using a gridPanel populated with a GeoExt.data.WMSCapabilitiesStore and
>> it is already working, the store is configured with a WMS URL but I want to
>> change the url taking it from a form and have the grid updated with the new
>> WMS capabilities information but I dont know how to do it, may anyone help
>> with this?
>>
>
> Try setting a new URL in the proxy used in the wms caps store:
>
> store.proxy.setUrl(newUrl, true);
> store.load();
>
>
>>
>> Now I am creating a new store and loading it in my gridPanel but I cant
>> refresh or update it in order to view the capabilities data… my grid doesnt
>> update with the new data.
>>
>
> Yes, I'm not sure you can change a grid's store.
>
>
> Hope it helps,
>
>
--
Alexandre Dubé
Mapgears
www.mapgears.com
_______________________________________________
Users mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/users