<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content=text/html;charset=iso-8859-1>
<STYLE type=text/css><!-- DIV {margin:0px;} --></STYLE>
<META content="MSHTML 6.00.6002.18309" 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>this line</FONT></DIV>
<DIV>featureNS: "topp" <BR> OR
<BR><SPAN> "<A
href="http://www.openplans.org/topp"
target=_blank>http://www.openplans.org/topp</A>"</SPAN><BR><FONT face=Arial
size=2>you need to use one or the other. so it should be either</FONT></DIV>
<DIV><FONT face=Arial size=2>featureNS:"topp"</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>or</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>featureNS:<A
title="http://www.openplans.org/topp CTRL + Click to follow link"
href="http://www.openplans.org/topp">http://www.openplans.org/topp</A></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>but not both in the same place like
that.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV style="FONT: 10pt Tahoma">
<DIV><FONT face=Arial></FONT><FONT face=Arial></FONT><FONT
face=Arial></FONT><BR></DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=truongxuanquang@yahoo.com
href="mailto:truongxuanquang@yahoo.com">truongxuan quang</A> </DIV>
<DIV><B>Sent:</B> Monday, November 29, 2010 12:01 PM</DIV>
<DIV><B>To:</B> <A title=mpriour@kestrelcomputer.com
href="mailto:mpriour@kestrelcomputer.com">Matt Priour</A> </DIV>
<DIV><B>Cc:</B> <A title=users@geoext.org
href="mailto:users@geoext.org">users@geoext.org</A> </DIV>
<DIV><B>Subject:</B> Re: [Users] Question about FormPanel</DIV></DIV></DIV>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT
face=Arial size=2></FONT><BR></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman,new york,times,serif">
<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
title="http://ian01.geog.psu.edu/geoserver/www/search/gazetteer.html CTRL + Click to follow link"
href="http://ian01.geog.psu.edu/geoserver/www/search/gazetteer.html ">http://ian01.geog.psu.edu/geoserver/www/search/gazetteer.html
</A><BR>for searching by using WFS as example functions bellow: <BR></FONT><SPAN
class=Apple-style-span
style="WORD-SPACING: 0px; FONT: medium 'Times New Roman'; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; orphans: 2; widows: 2"><PRE style="WORD-WRAP: break-word"> var protocol= OpenLayers.Protocol.WFS({<BR><SPAN> url: "<A href="http://ian01.geog.psu.edu/geoserver/wfs" target=_blank>http://ian01.geog.psu.edu/geoserver/wfs</A>",</SPAN><BR> featureType: "pop_places",<BR><SPAN> featureNS: "<A href="http://geovista.psu.edu" target=_blank>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 <br />(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 href="http://ian01.geog.psu.edu/geoserver/wfs" target=_blank>http://ian01.geog.psu.edu/geoserver/wfs</A></SPAN><BR></PRE></SPAN><FONT
size=3>==>In my case, I change above code for exactly my cases as
bellow:</FONT><BR><BR><BR><SPAN class=Apple-style-span
style="WORD-SPACING: 0px; FONT: medium 'Times New Roman'; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; orphans: 2; widows: 2"><PRE style="WORD-WRAP: break-word">var protocol= OpenLayers.Protocol.WFS({<BR><SPAN> url: "<A href="http://localhost:8080/geoserver/wfs" target=_blank>http://localhost:8080/geoserver/wfs</A>",</SPAN><BR> featureType: "municipalities",<BR> featureNS: "topp" <BR> OR <BR><SPAN> "<A href="http://www.openplans.org/topp" target=_blank>http://www.openplans.org/topp</A>"</SPAN><BR> });<BR><SPAN class=Apple-style-span style="WORD-SPACING: 0px; FONT: medium 'Times
New Roman'; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; orphans: 2; widows: 2"><PRE style="WORD-WRAP: break-word">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> {<BR> xtype: 'textfield',<BR> fieldLabel: ' Population >',<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
href="http://localhost:8080/geoserver/wfs?VERSION=1.0.0&SERVICE=WFS&REQUEST=GetCapabilities#topp:municipalities"
target=_blank>http://localhost:8080/geoserver/wfs?VERSION=1.0.0&SERVICE=WFS&REQUEST=GetCapabilities#topp:municipalities</A></SPAN><BR><BR>I
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> </FONT><BR></DIV><BR></DIV>
<DIV
style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman,new york,times,serif"><BR>
<DIV
style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman,new york,times,serif"><FONT
face=Tahoma size=2>
<HR SIZE=1>
<B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Matt Priour
<mpriour@kestrelcomputer.com><BR><B><SPAN
style="FONT-WEIGHT: bold">To:</SPAN></B> truongxuan quang
<truongxuanquang@yahoo.com>; 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 face=Arial size=2>The 1st thing you need when developing against any
OWS (WMS,WFS,WMC,CWS,etc..) is a way to actually see the message to &
response from the server. You can use Fiddler (PC Only) or Firebug
(Firefox) or (to a much more limited degree) WebKit Developer
Tools.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Without tools like this, you are really just
shooting in the dark.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Assuming that all the code below is correct and you
are using Geoserver, then you MUST get the featureNS value.</FONT></DIV>
<DIV><FONT face=Arial size=2>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 face=Arial size=2>On the Layers list you see Type, Workspace, Store,
& 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 face=Arial size=2>featureType:'tiger:poi', (that is the layer name
with the namespace)</FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN>featureNS:'<A href="http://www.census.gov"
target=_blank>http://www.census.gov</A>' (that is the Workspace
URI)</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>-- OR --</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>featureType:'poi' (that is the layer name, without
the namespace)</FONT></DIV>
<DIV><FONT face=Arial size=2>featureNS:'tiger' (that is the namespace, which is
the same as the Workspace)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>the first example is really the 'correct' way, but
the second way works as well.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Hope that helps</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>NOTE: If you are using other servers, like
Mapserver, then using namespaces can sometimes cause issues.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>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: rgb(245,245,245)">
<DIV><B>From:</B> <A title=truongxuanquang@yahoo.com
href="mailto:truongxuanquang@yahoo.com" target=_blank rel=nofollow
ymailto="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 title=users@geoext.org href="mailto:users@geoext.org"
target=_blank rel=nofollow
ymailto="mailto:users@geoext.org">users@geoext.org</A> </DIV>
<DIV><B>Subject:</B> [Users] Question about FormPanel</DIV></DIV></DIV>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT
face=Arial size=2></FONT><FONT face=Arial size=2></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 face=Arial size=2></FONT><FONT
face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT face=Arial
size=2></FONT><BR></P>
<P class=western style="MARGIN-BOTTOM: 0cm"><SPAN>I am trying to do search
function following example in this site <A
href="http://ian01.geog.psu.edu/geoserver/www/search/gazetteer.html"
target=_blank>http://ian01.geog.psu.edu/geoserver/www/search/gazetteer.html</A>
</SPAN></P>
<P class=western style="MARGIN-BOTTOM: 0cm"><FONT face=Arial size=2></FONT><FONT
face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT face=Arial
size=2></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 face=Arial size=2></FONT><FONT
face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT face=Arial
size=2></FONT><BR></P><PRE class=western><A rel=nofollow name=line1></A><SPAN> var protocol= OpenLayers.Protocol.WFS({<BR><SPAN> url: "<A href="http://localhost:8080/geoserver/wfs" target=_blank>http://localhost:8080/geoserver/wfs</A>",</SPAN><BR> featureType: "municipaliteis",<BR> //featureNS: "</SPAN><SPAN><A href="http://geovista.psu.edu/" target=_blank>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></DIV></DIV><BR>
<P></P>
<HR>
<P></P>_______________________________________________<BR>Users mailing
list<BR>Users@geoext.org<BR><SPAN><A
href="http://www.geoext.org/cgi-bin/mailman/listinfo/users"
target=_blank>http://www.geoext.org/cgi-bin/mailman/listinfo/users</A></SPAN><BR></DIV></DIV></DIV><BR></BODY></HTML>