<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>Thank you very much, I wrote my remain problem here, I hope you can help me one more time <br><br><div><font size="3"><br>
  <br>
I am trying to do as this example<font size="2"> </font><a href="http://ian01.geog.psu.edu/geoserver/www/search/gazetteer.html">http://ian01.geog.psu.edu/geoserver/www/search/gazetteer.html&nbsp; </a><br>
for searching by using WFS as example functions bellow: <br>
</font><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><pre style="word-wrap: break-word; white-space: pre-wrap;"> var protocol= OpenLayers.Protocol.WFS({<br><span>        url: "<a target="_blank" href="http://ian01.geog.psu.edu/geoserver/wfs">http://ian01.geog.psu.edu/geoserver/wfs</a>",</span><br>        featureType: "pop_places",<br><span>        featureNS: "<a target="_blank" href="http://geovista.psu.edu">http://geovista.psu.edu</a>"</span><br>    });<br><br>    formPanel = new GeoExt.form.FormPanel({<br>        title: "Place Name Search",<br>        height: 150,<br>        region: "north",<br>        protocol: protocol,<br>        items: [{<br>         
   xtype: "textfield",<br>            width: 200,<br>            name: "name__like",<br>            //value: "State College",<br>            fieldLabel: "name &lt;br /&gt;(use * and . for wildcards)",<br>            allowBlank: false,<br>            minLength: 4,<br>        }],<br>        listeners: {<br>            actioncomplete: function(form, action) {<br>                features = action.response.features;<br>                store.loadData(features);<br>                vm=map.getLayersByName("Results");<br>                if(vm.length===0){<br>                    vecLayer = new OpenLayers.Layer.Vector("Results");<br>                    map.addLayer(vecLayer);<br>                    store.bind(vecLayer);<br>                    select.bind(vecLayer);<br>                }<br>            }<br>        },<br>        buttons: [{text: 'search',<br>            handler: function(){<br>                formPanel.search();<br>            }<br>        }],<br>    
    keys: [{ key: [Ext.EventObject.ENTER], <br>            handler: function() {<br>                formPanel.search();<br>            }<br>        }]<br>    });<br><span>when I use FireBug for checking GET method in console is showed GET <a target="_blank" href="http://ian01.geog.psu.edu/geoserver/wfs">http://ian01.geog.psu.edu/geoserver/wfs</a></span><br></pre></span><font size="3">==&gt;In my case, I change above code for exactly my cases as bellow:</font><br>
<br>
<br><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><pre style="word-wrap: break-word; white-space: pre-wrap;">var protocol= OpenLayers.Protocol.WFS({<br><span>        url: "<a target="_blank" href="http://localhost:8080/geoserver/wfs">http://localhost:8080/geoserver/wfs</a>",</span><br>        featureType: "municipalities",<br>        featureNS: "topp" <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; OR <br><span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; "<a target="_blank" href="http://www.openplans.org/topp">http://www.openplans.org/topp</a>"</span><br>    });<br><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times
 New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><pre style="word-wrap: break-word; white-space: pre-wrap;">formPanel = new GeoExt.form.FormPanel({<br>        title: " Search",<br>        height: 150,<br>        region: "north",<br>        protocol: protocol,<br>        items: [{<br>            xtype: "textfield",<br>            name: "name__like",<br>            fieldLabel: "Population=",<br>        },<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>                  xtype: 'textfield',<br>                  fieldLabel: '  Population  &gt;',<br>                  name: 'POPULATION__ge'<br>                                  <br>             }],<br>        listeners: {....same above example</pre></span>others functions are configured all most same above..<br></pre></span><font size="3">
<br>when I check my wfs by using uDig, it showed municipalities layers at :<br><br><span>
<a target="_blank" href="http://localhost:8080/geoserver/wfs?VERSION=1.0.0&amp;SERVICE=WFS&amp;REQUEST=GetCapabilities#topp:municipalities">http://localhost:8080/geoserver/wfs?VERSION=1.0.0&amp;SERVICE=WFS&amp;REQUEST=GetCapabilities#topp:municipalities</a></span><br><br>
I&nbsp; used Firebug for bug GET method but in console window's Firebug showed nothing, <br>
  <br>
Could you please have a look for my protocol for 'municipalities' 
feature is it correct or not..? <br>If it corrected please have a look down and note for other function if there is made errors for my searching function <br>
  <br>
  <br>
Many thanks <br>
  <br>
Quang<br>
&nbsp;</font><br>
</div>
<br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Matt Priour &lt;mpriour@kestrelcomputer.com&gt;<br><b><span style="font-weight: bold;">To:</span></b> truongxuan quang &lt;truongxuanquang@yahoo.com&gt;; users@geoext.org<br><b><span style="font-weight: bold;">Sent:</span></b> Sat, November 27, 2010 4:35:50 AM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [Users] Question about FormPanel<br></font><br>


 



<div><font size="2" face="Arial">The 1st thing you need when developing against any 
OWS (WMS,WFS,WMC,CWS,etc..) is a way to actually see the message to &amp; 
response from the server. You can use Fiddler (PC Only)&nbsp;or Firebug 
(Firefox) or (to a much more limited degree) WebKit Developer 
Tools.</font></div>
<div><font size="2" face="Arial"></font>&nbsp;</div>
<div><font size="2" face="Arial">Without tools like this, you are really just 
shooting in the dark.</font></div>
<div><font size="2" face="Arial"></font>&nbsp;</div>
<div><font size="2" face="Arial">Assuming that all the code below is correct and you 
are using Geoserver, then you MUST get the featureNS value.</font></div>
<div><font size="2" face="Arial">It is pretty easy, just logon to Geoserver and look 
at the layer list. We'll take the tiger:poi layer as an example.</font></div>
<div><font size="2" face="Arial">On the Layers list you see Type, Workspace, Store, 
&amp; Layer Name columns. The ones you are interested in are Workspace and Layer 
Name columns. For the tiger:poi example you can either use:</font></div>
<div><font size="2" face="Arial">featureType:'tiger:poi', (that is the layer name 
with the namespace)</font></div>
<div><font size="2" face="Arial"><span>featureNS:'<a target="_blank" href="http://www.census.gov">http://www.census.gov</a>' (that is the 
Workspace URI)</span></font></div>
<div><font size="2" face="Arial"></font>&nbsp;</div>
<div><font size="2" face="Arial">-- OR --</font></div>
<div><font size="2" face="Arial"></font>&nbsp;</div>
<div><font size="2" face="Arial">featureType:'poi' (that is the layer name, without 
the namespace)</font></div>
<div><font size="2" face="Arial">featureNS:'tiger' (that is the namespace, which is 
the same as the Workspace)</font></div>
<div><font size="2" face="Arial"></font>&nbsp;</div>
<div><font size="2" face="Arial">the first example is really the 'correct' way, but 
the second way works as well.</font></div>
<div><font size="2" face="Arial"></font>&nbsp;</div>
<div><font size="2" face="Arial">Hope that helps</font></div>
<div><font size="2" face="Arial"></font>&nbsp;</div>
<div><font size="2" face="Arial">NOTE: If you are using other servers, like 
Mapserver, then using namespaces can sometimes cause issues.</font></div>
<div><font size="2" face="Arial"></font>&nbsp;</div>
<div><font size="2" face="Arial">Matt Priour</font></div>
<div style="font: 10pt Tahoma;">
<div><font face="Arial"></font><font face="Arial"></font><font face="Arial"></font><font face="Arial"></font><font face="Arial"></font><br></div>
<div style="background: none repeat scroll 0% 0% rgb(245, 245, 245);">
<div style=""><b>From:</b> <a rel="nofollow" title="truongxuanquang@yahoo.com" ymailto="mailto:truongxuanquang@yahoo.com" target="_blank" href="mailto:truongxuanquang@yahoo.com">truongxuan quang</a> </div>
<div><b>Sent:</b> Friday, November 26, 2010 5:28 PM</div>
<div><b>To:</b> <a rel="nofollow" title="users@geoext.org" ymailto="mailto:users@geoext.org" target="_blank" href="mailto:users@geoext.org">users@geoext.org</a> </div>
<div><b>Subject:</b> [Users] Question about FormPanel</div></div></div>
<div><font size="2" face="Arial"></font><font size="2" face="Arial"></font><font size="2" face="Arial"></font><font size="2" face="Arial"></font><br></div>
<div style="font-size: 14pt; color: rgb(0, 0, 0); font-family: times,serif;">
<div>
<p class="western" style="margin-bottom: 0cm;">Hello List,</p>
<p class="western" style="margin-bottom: 0cm;"><font size="2" face="Arial"></font><font size="2" face="Arial"></font><font size="2" face="Arial"></font><font size="2" face="Arial"></font><br></p>
<p class="western" style="margin-bottom: 0cm;"><span>I am trying to do search function 
following example in this site <a target="_blank" href="http://ian01.geog.psu.edu/geoserver/www/search/gazetteer.html">http://ian01.geog.psu.edu/geoserver/www/search/gazetteer.html</a> 
</span></p>
<p class="western" style="margin-bottom: 0cm;"><font size="2" face="Arial"></font><font size="2" face="Arial"></font><font size="2" face="Arial"></font><font size="2" face="Arial"></font><br></p>
<p class="western" style="margin-bottom: 0cm;">I wrote almost same the above 
example given, I change only in my data what I istalled in Geoserver </p>
<p class="western" style="margin-bottom: 0cm;"><font size="2" face="Arial"></font><font size="2" face="Arial"></font><font size="2" face="Arial"></font><font size="2" face="Arial"></font><br></p><pre class="western"><a rel="nofollow" name="line1"></a><span> var protocol= OpenLayers.Protocol.WFS({<br><span>        url: "<a target="_blank" href="http://localhost:8080/geoserver/wfs">http://localhost:8080/geoserver/wfs</a>",</span><br>        featureType: "municipaliteis",<br>        //featureNS: "</span><span><a target="_blank" href="http://geovista.psu.edu/">http://geovista.psu.edu/</a>" I dont know how to fix this line</span><br>    });<br><br>    formPanel = new GeoExt.form.FormPanel({<br>        title: "Place Name Search",<br>        height: 150,<br>        region: "north",<br>        protocol: protocol,<br>        items: [{<br>            xtype: "textfield",<br>            width: 200,<br>            name: "name__like",<br>            minLength: 4<br>  
      },<br>                xtype: "textfield",<br>            width: 200,<br>            name: "population__ge"<br>                ],<br>        listeners: {<br>            actioncomplete: function(form, action) {<br>                features = action.response.features;<br>                store.loadData(features);<br>                vm=map.getLayersByName("Results");<br>                if(vm.length===0){<br>                    vecLayer = new OpenLayers.Layer.Vector("Results");<br>                    map.addLayer(vecLayer);<br>                    store.bind(vecLayer);<br>                    select.bind(vecLayer);<br>                }<br>            }<br>        },<br>        buttons: [{text: 'search',<br>            handler: function(){<br>                formPanel.search();<br>            }<br>        }],<br>        keys: [{ key: [Ext.EventObject.ENTER], <br>            handler: function() {<br>                formPanel.search();<br>            }<br>        }]<br>    });<br><br>I
 tried for all most one week to fix it, but it still not working... When I click to command button "search" it did not show any thing. If some one have experience about this work please write me a command.<br><br>Thank in advance <br><br>Quang  </pre></div>
<div style=""></div></div><br>
<p>
</p><hr>

<p></p>_______________________________________________<br>Users mailing 
list<br>Users@geoext.org<br><span><a target="_blank" href="http://www.geoext.org/cgi-bin/mailman/listinfo/users">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a></span><br></div></div>
</div><br>

      </body></html>