Matt, thanks for full answer!<br>A little workaround for my problem, maybe useful for anyone:<br><br>store.unbind();<br>store.removeAll();<br>store.bind(layer2);<br>gridPanel.getSelectionModel().unbind();<br>gridPanel.getSelectionModel().bind(layer2);<br>
<br><div class="gmail_quote">On Fri, May 27, 2011 at 8:22 PM, Matt Priour <span dir="ltr"><<a href="mailto:mpriour@kestrelcomputer.com">mpriour@kestrelcomputer.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div style="padding-right:10px;padding-left:10px;padding-top:15px" name="Compose message area">
<div><font face="Arial" size="2">There may or may not be a way to unbind/rebind a
layer to a feature store. However, the unbind/bind functions are internal
functions that register and unregister event listeners.</font></div>
<div><font face="Arial" size="2">However, the GeoExt pattern of doing things really
expects a single layer to feature store relation. Doing otherwise is going to
cause you to jump through many more hoops and monkey patch various bits of
code.</font></div>
<div><font face="Arial" size="2">Grids and data views have methods to reconfigure
the view with a new store, field definitions, or both. Any visualization you
would be using a feature store with will able to handle switching the store much
easier than changing the layer attached to the store.</font></div>
<div><font face="Arial" size="2">Matt Priour</font></div>
<div><font face="Arial" size="2">Kestrel Computer Consulting</font></div>
<div style="font:10pt Tahoma">
<div><br></div>
<div style="background:#f5f5f5">
<div><b>From:</b> <a title="rykovd@gmail.com" href="mailto:rykovd@gmail.com" target="_blank">Denis Rykov</a> </div>
<div><b>Sent:</b> Friday, May 27, 2011 5:48 AM</div>
<div><b>To:</b> <a title="Users@geoext.org" href="mailto:Users@geoext.org" target="_blank">Users@geoext.org</a> </div>
<div><b>Subject:</b> [Users] FeatureStore unbinding</div></div></div><div><div></div><div class="h5">
<div><br></div>Hi!
<div><br></div>
<div>Please help me with the following problem. Little testcase:</div>
<div><br></div>
<div>1) There are two layers on map (e.g., layer1 and layer2);</div>
<div>2) FeatureStore (store) binded to layer1;</div>
<div>3) After loading map try to perform: </div>
<div>store.unbind()</div>
<div>store.bind(layer2)</div>
<div><br></div>
<div>Features of both layers takes layer2 style! Is it bug?</div>
<div><br></div>
<div>What is the right way to unbin store from one layer and bind it to
another?</div>
<div>Big thanks.</div>
</div></div><p>
</p><hr>
<p></p>_______________________________________________<br>Users mailing
list<br><a href="mailto:Users@geoext.org" target="_blank">Users@geoext.org</a><br><a href="http://www.geoext.org/cgi-bin/mailman/listinfo/users" target="_blank">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a><br>
<p></p></div>
</blockquote></div><br>