<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content=text/html;charset=iso-8859-1>
<META content="MSHTML 6.00.6002.18357" name=GENERATOR></HEAD>
<BODY id=MailContainerBody
style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-TOP: 15px" leftMargin=0
topMargin=0 CanvasTabStop="true" name="Compose message area">
<DIV><FONT face=Arial size=2>The issue is that you are looking at 2 totally
different things.</FONT></DIV>
<DIV><FONT face=Arial size=2>The checkbox for the layer on the tree controls the
WFS layer's visibility on the map.</FONT></DIV>
<DIV><FONT face=Arial size=2>This merely makes the div which hosts the vector
features visible or not once the features have initially loaded.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>The grid is attached to a FeatureStore synced with
the WFS Layer's features.</FONT></DIV>
<DIV><FONT face=Arial size=2>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.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>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)</FONT></DIV>
<DIV><FONT face=Arial size=2></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 style="font-color: black"><B>From:</B> <A title=daniel.behr@hzg.de
href="mailto:daniel.behr@hzg.de">Daniel Behr</A> </DIV>
<DIV><B>Sent:</B> Thursday, February 17, 2011 4:24 AM</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] Synchronising LayerTree Node w/ checkbox and Map
with aGrid Panel</DIV></DIV></DIV>
<DIV><BR></DIV>Hi,<BR>rather simple question, I guess, but I cant figure it
out.<BR><BR>I have a mapPanel and a treePanel, added a WFS Layer with a checkbox
to <BR>the tree and when the box is checked the features are loaded and I see a
<BR>list of features in a grid panel below.<BR>this works as expected until the
box is unchecked. The grid panel is not <BR>cleared.<BR><BR>adding a listener to
the tree config clears the gridpanel but after <BR>checking the box again the
map is updated but the grid stays empty.<BR><BR>listeners:
{<BR> 'checkchange': function(node, checked) {<BR>if (checked
=== false) {<BR> //
gridPanel.toggleCollapse()<BR>
gridPanel.removeAll();<BR>
gridPanel.update()<BR>}<BR> }<BR>}<BR><BR>does anyone know of
an example where I can look at the code or maybe <BR>someone can give me a hint
what I am missing
here?<BR>thanks<BR>Dan<BR>_______________________________________________<BR>Users
mailing list<BR><A href="mailto:Users@geoext.org">Users@geoext.org</A><BR><A
href="http://www.geoext.org/cgi-bin/mailman/listinfo/users">http://www.geoext.org/cgi-bin/mailman/listinfo/users</A><BR></BODY></HTML>