<HTML><HEAD></HEAD>
<BODY dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-FAMILY: 'Arial'; COLOR: #000000; FONT-SIZE: 10pt">
<DIV>The tree is not synchronized with the store. It just uses it to build the
nodes. Changes in the LayerStore don’t automatically reflect in the tree. So if
you look at your code, you can see that it is trying to build a tree from an
empty store.</DIV>
<DIV>The layerTree code needs to execute AFTER the store has loaded.</DIV>
<DIV> </DIV>
<DIV>Matt Priour</DIV>
<DIV>Kestrel Computer Consulting</DIV>
<DIV
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">
<DIV style="FONT: 10pt tahoma">
<DIV> </DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=rykovd@gmail.com
href="mailto:rykovd@gmail.com">Denis Rykov</A> </DIV>
<DIV><B>Sent:</B> Thursday, August 11, 2011 11:44 PM</DIV>
<DIV><B>To:</B> <A title=Users@geoext.org
href="mailto:Users@geoext.org">Users@geoext.org</A> </DIV>
<DIV><B>Subject:</B> [Users] Layer tree based on
WFSCapabilitiesStore</DIV></DIV></DIV>
<DIV> </DIV></DIV>
<DIV
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">Is
it possible to build layer tree based on WFSCapabilitiesStore?<BR><BR>I try to
make it as following:<BR><BR>
<script><BR> var store,
layerList;<BR>
Ext.onReady(function()
{<BR><BR>
Ext.onReady(function()
{<BR><BR>
// create a new WFS capabilities
store<BR>
store = new
GeoExt.data.WFSCapabilitiesStore({<BR>
url:<BR>"http://map.rostmuseum.ru/scripts/tinyows/tinyows.cgi?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetCapabilities",<BR>
layerOptions: function()
{<BR>
return
{<BR>
visibility:
false,<BR>
displayInLayerSwitcher:
false,<BR>
strategies: [new<BR>OpenLayers.Strategy.BBOX({ratio:
1})]<BR>
};<BR>
}<BR>
});<BR><BR>
layerList = new
GeoExt.tree.LayerContainer({<BR>
text: 'All
Layers',<BR>
layerStore:
store,<BR>
leaf:
false,<BR>
expanded:
true<BR>
});<BR><BR>
var layerTree = new
Ext.tree.TreePanel({<BR>
title: 'Map
Layers',<BR>
renderTo:
'capgrid',<BR>
root:
layerList<BR>
});<BR><BR>
store.load();<BR>
});<BR>
});<BR> </script><BR><BR>But it
not works.<BR>_______________________________________________<BR>Users mailing
list<BR>Users@geoext.org<BR>http://www.geoext.org/cgi-bin/mailman/listinfo/users<BR></DIV></DIV></DIV></BODY></HTML>