The issue is that you are looking at 2 totally different things. The checkbox for the layer on the tree controls the WFS layer's visibility on the map. This merely makes the div which hosts the vector features visible or not once the features have initially loaded.
The grid is attached to a FeatureStore synced with the WFS Layer's features. When you clear the grid then you are affecting the store and if you have the sync direction from layer-to-store only then removing records from the store doesn't remove them from the layer. If you really want the features to clear from the grid and then return in response to the checkbox, then what you should do is apply an always false filter to the feature store when you uncheck the layer and remove the filter when you check the layer. (I would actually attach that to the layer's visibilitychanged event and not the checkbox's events) Matt Priour Kestrel Computer Consulting From: Daniel Behr Sent: Thursday, February 17, 2011 4:24 AM To: [email protected] Subject: [Users] Synchronising LayerTree Node w/ checkbox and Map with aGrid Panel Hi, rather simple question, I guess, but I cant figure it out. I have a mapPanel and a treePanel, added a WFS Layer with a checkbox to the tree and when the box is checked the features are loaded and I see a list of features in a grid panel below. this works as expected until the box is unchecked. The grid panel is not cleared. adding a listener to the tree config clears the gridpanel but after checking the box again the map is updated but the grid stays empty. listeners: { 'checkchange': function(node, checked) { if (checked === false) { // gridPanel.toggleCollapse() gridPanel.removeAll(); gridPanel.update() } } } does anyone know of an example where I can look at the code or maybe someone can give me a hint what I am missing here? thanks Dan _______________________________________________ Users mailing list [email protected] http://www.geoext.org/cgi-bin/mailman/listinfo/users
_______________________________________________ Users mailing list [email protected] http://www.geoext.org/cgi-bin/mailman/listinfo/users
