Hi Bart, I would really appreciate any help with this! <div>Below is the code, for the simplicity of it, it is all in one HTML. You only have to have Geoext locally...<div>Javascript is directly copied from GeoExt API example: <a href="http://www.geoext.org/lib/GeoExt/widgets/form/SearchAction.html" target="_blank">http://www.geoext.org/lib/GeoExt/widgets/form/SearchAction.html</a></div>
<div>When I run this, Firefox error console says: </div><div><br></div><div><div>Errora: Ext.form.Panel is not a constructor</div><div>Source file: <a href="http://localhost/search_test/search-form.html">http://localhost/search_test/search-form.html</a></div>
<div>Line: 18</div></div><div><br></div><div>---search_test.html-----</div><div><div><html></div><div> <head></div><div> <script type="text/javascript" src="<a href="http://extjs.cachefly.net/builds/ext-cdn-771.js">http://extjs.cachefly.net/builds/ext-cdn-771.js</a>"></script></div>
<div> <link rel="stylesheet" type="text/css" href="<a href="http://extjs.cachefly.net/ext-2.2.1/resources/css/ext-all.css">http://extjs.cachefly.net/ext-2.2.1/resources/css/ext-all.css</a>" /></div>
<div> <link rel="stylesheet" type="text/css" href="<a href="http://extjs.cachefly.net/ext-2.2.1/examples/shared/examples.css">http://extjs.cachefly.net/ext-2.2.1/examples/shared/examples.css</a>" /></div>
<div> <script src="<a href="http://openlayers.org/api/2.8/OpenLayers.js">http://openlayers.org/api/2.8/OpenLayers.js</a>"></script></div><div> <script type="text/javascript" src="/GeoExt/script/GeoExt.js"></script></div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span><script type="text/javascript"></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>var formPanel = new Ext.form.Panel({</div>
<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">http://publicus.opengeo.org/geoserver/wfs</a>",</div><div> featureType: "tasmania_roads",</div>
<div> featureNS: "<a href="http://www.openplans.org/topp">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><span class="Apple-tab-span" style="white-space:pre">        </span></div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span></div><div><span class="Apple-tab-span" style="white-space:pre">        </span></script></div><div> </head></div><div> <body></div>
<div> </div><div> <div id="formpanel" style="float:left;"></div></div><div> </div><div> </body></div><div></html></div></div><div><br clear="all">
--- <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<br>
<br><br><div class="gmail_quote">On Sun, Feb 14, 2010 at 4:14 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,<div><br></div><div>Ext.form.Panel and Ext.form.FormPanel are aliases in Ext, that should not be your issue.</div><div><br></div><div>Can you post your full non-working example?</div><div>
<br></div><div>Best regards,</div><div>Bart</div><div><br><div><div><div></div><div class="h5"><div>On Feb 12, 2010, at 1:12 PM, Zoran Jankovic wrote:</div><br></div></div><blockquote type="cite"><div><div></div><div class="h5">
Hi list,<div>Do I have to emphasize I'm a newbie :-)?</div><div>OK, so as I can see the documentation is a little bit old, some things have changed (new ExtJS versions, etc)... But, I'm trying to master searching through features. My setup is very simple one, I have some SHP, loaded into Geoserver as a layer.</div>
<div>I was looking into Geoext documentation and found this:</div><div><a href="http://www.geoext.org/lib/GeoExt/widgets/form/SearchAction.html" target="_blank">http://www.geoext.org/lib/GeoExt/widgets/form/SearchAction.html</a></div>
<div>
<br></div><div>What JS I have to reference to get this working? I have tried with the setup from geoext tutorial, and with my own local Ext-2.3.0, Geoext and OpenLayers-2.8, to no effect...</div><div><br></div><div>The first problem I can see, in Ext-2.3.0 API documentation there is no more </div>
<div>Ext.form.Panel</div><div>but there is</div><div>Ext.form.FormPanel object</div><div><br></div><div>So, if I use my setup from the basic example (so I now it loads ExtJS 2.3.0, geoext 0.6 and OpenLayers 2.8) I get what is basically a blank page (only what I add as HTML is rendered), Firefox Error Console gives a bunch of warnings and 1 error:</div>
<div><br></div><div><div>Error: Ext.form.Panel is not a constructor</div><div>Source File: <a href="http://localhost/trazenje/" target="_blank">http://localhost/trazenje/</a></div><div>Line: 22</div><div><br></div></div>
<div>And if I try changing Ext.form.Panel to Ext.form.Formpanel I get:</div>
<div><br></div><div><div>Error: ct is null</div><div>Source File: <a href="http://localhost/ext-2.3.0/ext-all.js" target="_blank">http://localhost/ext-2.3.0/ext-all.js</a></div><div>Line: 1140</div><div><br></div></div><div>
Needles to say my Javascript knowledge is limited, but I was under the (probably false ;-) ) impression that I would at least be able to run some examples :-(.</div>
<div>Where is the error? What should be in <head> to be able to run this example?</div><div><br></div><div><br></div><div>--- <br>Zoran<br><br>
</div></div></div>
_______________________________________________<br>Users mailing list<br><a href="mailto:Users@geoext.org" target="_blank">Users@geoext.org</a><br><a href="http://www.geoext.org/cgi-bin/mailman/listinfo/users" target="_blank">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div><br></div></div></blockquote></div><br></div></div>