<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><div id="yiv896970554"><table id="yiv896970554bodyDrftID" class="yiv896970554" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td id="yiv896970554drftMsgContent" style="font: inherit;"><div id="yiv896970554yiv725624452"><table id="yiv896970554yiv725624452bodyDrftID" class="yiv896970554yiv725624452" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td id="yiv896970554yiv725624452drftMsgContent" style="font: inherit;">Dear all,<br>I am trying to breakdown and understand the QueryPanel example, which allows you to add WFS layers matching given criteria to a map. Original example hosted at: http://gxp.opengeo.org/trunk/core/examples/query.html<br><br>I am having trouble with two things:<br>1: returning a filtered XML containing only the objects meeting the query criteria (the xml file returned contains All objects)<br>2: adding the new layer to the
map.<br><br>My attempt is online at: <br>https://fishpoptrace.jrc.ec.europa.eu/newmap/query.html<br><br>An example query would be "CODE = FI" (to highlight Finland)<br>Firebug shows the xml returned, which does
not filter out the other countries (it returns all countries)<br>Placing breakpoints in the javascript, it appears to stall during the code for the listener to the query button, which should add the layer to the map,
(code snippet for listener below).<br><br>I would be really grateful if any of you could help point me in the right direction so that I could add the filtered layer to the map.<br>Many thanks,<br>Eoin<br><br>listeners: {<br> storeload: function(panel, store) {<br> vector.destroyFeatures();<br> var features = [];<br> store.each(function(record) {<br> features.push(record.get("feature"));<br>
});<br> vector.addFeatures(features);<br> }<br> }<br><br>The code appears to stall at the lines:<br> <br>store.each(function(record) {<br>
features.push(record.get("feature"));<br>
});<br> </td></tr></tbody></table></div></td></tr></tbody></table></div></td></tr></table><br>