<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Zoran,<div><br></div><div>basically it just uses WFS Web Feature Service under the hood. So you need to understand that protocol.</div><div><br></div><div>If you have your geoserver running, try and do a GetFeature request with maxfeatures 10 on your layer/featuretype to ensure things are properly working on that side, so e.g.</div><div><br></div><div><a href="http://foo/geoserver?service=WFS&request=GetFeature&typename=xxx&maxfeatures=10&version=1.1.0">http://foo/geoserver?service=WFS&request=GetFeature&typename=xxx&maxfeatures=10&version=1.1.0</a></div><div><br></div><div>After that configure your OpenLayers protocol which will be used by GeoExt search components.</div><div><br></div><div>Also, if you have not already done so, install Firebug to see the request response cycle.</div><div><br></div><div>Best regards,</div><div>Bart</div><div><br><div><div>On Feb 14, 2010, at 5:13 PM, Zoran Jankovic wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><br>
<br><br><div class="gmail_quote">On Sun, Feb 14, 2010 at 4:56 PM, Bart van den Eijnden <span dir="ltr"><<a href="mailto:bartvde@osgis.nl">bartvde@osgis.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div style="word-wrap:break-word">Hi Zoran,<div><br></div><div>ok, I see now, indeed you need to use Ext.form.FormPanel, ignore my previous post about that.</div><div><br></div><div>The other problem you reported (ct is undefined), is because you are running your javascript code before the DOM is ready, and your div is simply not yet there. So use Ext.onReady instead to wrap your code, something like:</div>
<div><br></div><div><div>Ext.onReady(</div><div>function() {</div><div> var formPanel = new Ext.form.FormPanel({</div><div class="im"><div> renderTo: "formpanel",</div><div> items: [{</div><div> xtype: "textfield",</div>
<div> name: "name__like",</div><div> value: "mont"</div><div> }, {</div><div> xtype: "textfield",</div><div> name: "elevation__ge",</div><div> value: "2000"</div>
<div> }]</div><div>});</div><div><br></div><div>var searchAction = new GeoExt.form.SearchAction(formPanel.getForm(), {</div><div> protocol: new OpenLayers.Protocol.WFS({</div><div> url: "<a href="http://publicus.opengeo.org/geoserver/wfs" target="_blank">http://publicus.opengeo.org/geoserver/wfs</a>",</div>
<div> featureType: "tasmania_roads",</div><div> featureNS: "<a href="http://www.openplans.org/topp" target="_blank">http://www.openplans.org/topp</a>"</div><div> }),</div><div> abortPrevious: true</div>
<div>});</div><div><br></div><div>formPanel.getForm().doAction(searchAction, {</div><div> callback: function(response) {</div><div> // response.features includes the features read</div><div> // from the server through the protocol</div>
<div> }</div><div>});</div><div><br></div></div><div>});</div><div><br></div><div>Best regards,</div><div>Bart</div></div><div><div></div><div class="h5"><div><br><div><div><div><br clear="all"></div></div></div></div>
</div></div></div></blockquote><div>OK, now we are getting somewhere :-). Finally I have something rendered in my DIV, although it's just two text fields, now at least I'm making some progress...</div><div>Is there _anywhere_ a working example of this Search action? As I in a previous post, I have SHP as a layer in Geoserver, and I need to search through "names" attribute and display the result...</div>
<div>I found Geonames example, but it's a definitive overkill for my needs, at least for now, and at this stadia of JS knowledge ;-).</div><div><br></div><div>BTW, that link "Test it!" under <a href="http://geoext.blogspot.com/">geoext.blogspot.com</a> (UX introduction) is also broken:</div>
<div><a href="http://dev.geoext.org/ux/GeoNamesSearchCombo/examples/GeoNamesSearchComboExample.html">http://dev.geoext.org/ux/GeoNamesSearchCombo/examples/GeoNamesSearchComboExample.html</a></div><div><br></div><div>Previous link will get you nowhere, you have to start from <a href="http://dev.geoext.org/ux">http://dev.geoext.org/ux</a> and work your way through to find this example:</div>
<div><a href="http://dev.geoext.org/ux/geoext.ux/ux/GeoNamesSearchCombo/examples/GeoNamesSearchComboExample.html">http://dev.geoext.org/ux/geoext.ux/ux/GeoNamesSearchCombo/examples/GeoNamesSearchComboExample.html</a></div>
<div><br></div><div>BR,</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div style="word-wrap:break-word"><div><div class="h5"><div><div>
<div><div>--- <br>Zoran Jankovic<br>ZIS-Izrada softvera i savjetovanje / ZIS - Software Development and Consulting<br><br><a href="http://www.zisis.hr/">http://www.zisis.hr</a><br><br>M: 00 385 98 682 902<br>T: 00 385 44 683 374<br>
<br>A. Senoe 4<br>44320 Kutina<br>Croatia</div></div></div></div></div></div></div></blockquote></div>
</blockquote></div><br></div></body></html>