<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Hi,<br>
<br>
Check with FIreBug or Fiddler that you are calling a different URL
each time - and that results should be different. <br>
If this is the case, are you refreshing your grid?<br>
<br>
I have working code to update a store's URL and parameters as
follows:<br>
<br>
this.store.proxy.setUrl(url, true);<br>
<br>
if (paramsObj) {<br>
this.store.reload({<br>
params: paramsObj<br>
});<br>
}<br>
<br>
Regards,<br>
<br>
Seth<br>
<br>
<a href="http://geographika.co.uk">http://geographika.co.uk</a><br>
<br>
On 20/01/2011 16:13, Amini, Manouchehr wrote:
<blockquote
cite="mid:B422D84F52D1C049B0D1B522E618C17702623546991B@EAW-EXC-MAIL.eawag.wroot.emp-eaw.ch"
type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<meta name="GENERATOR" content="MSHTML 8.00.6001.18999">
<div><font face="Arial" size="2">
<div><span class="698563309-18012011"><font face="Arial"
size="2">Dear Users</font></span></div>
<div><span class="698563309-18012011"></span> </div>
<div><span class="698563309-18012011"><font face="Arial"
size="2">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?</font></span></div>
<div><span class="698563309-18012011"><font face="Arial"
size="2">Here is the piece of code I use within a
function:</font></span></div>
<div><span class="698563309-18012011"></span> </div>
<div><span class="698563309-18012011"><font face="Arial"
size="2">###</font></span></div>
<div><span class="698563309-18012011"><font face="Arial"
size="2">function myfunc() {<br>
var uid = Ext.getDom('userid').title;<br>
win = new Ext.Window({<br>
width: 400,<br>
height: 400,<br>
layout: 'fit',<br>
closeAction: 'destroy',<br>
closable: true,<br>
});<br>
<br>
<br>
var url="<a moz-do-not-send="true"
title="blocked::http://localhost:8080/geoserver/wms?service=wms&version=1.1.1&request=GetCapabilities&namespace"
href="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</a>="
+ uid;<br>
mystore=new
GeoExt.data.WMSCapabilitiesStore({}); <br>
mystore.proxy.setUrl(url);<br>
mystore.proxy.setApi(Ext.data.Api.actions.read, url);<br>
mystore.reload()</font></span></div>
<div> </div>
<div><span class="698563309-18012011"><font face="Arial"
size="2"> mygrid=new Ext.grid.GridPanel({<br>
//title: "Available Layers",<br>
region: 'center',<br>
store: mystore,</font></span></div>
<div><span class="698563309-18012011"> <font
face="Arial" size="2">.......</font></span></div>
<div><span class="698563309-18012011"> <font
face="Arial" size="2">.......});</font></span></div>
<div><span class="698563309-18012011"><font face="Arial"
size="2"> win.add(mygrid);<br>
win.doLayout();<br>
win.show();</font></span></div>
<div><span class="698563309-18012011"><font face="Arial"
size="2">}</font></span></div>
<div><span class="698563309-18012011"><font face="Arial"
size="2">###</font></span></div>
<div><span class="698563309-18012011"></span> </div>
<div><span class="698563309-18012011"><font face="Arial"
size="2">Any advice?</font></span></div>
<div><span class="698563309-18012011"></span> </div>
<div><span class="698563309-18012011"></span> </div>
<div><span class="698563309-18012011"><font face="Arial"
size="2">Manouchehr</font></span></div>
</font></div>
<div> </div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@geoext.org">Users@geoext.org</a>
<a class="moz-txt-link-freetext" href="http://www.geoext.org/cgi-bin/mailman/listinfo/users">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>