<!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>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>featureNS:'http://www.census.gov' (that is the
Workspace URI)</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: #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> Friday, November 26, 2010 5:28 PM</DIV>
<DIV><B>To:</B> <A title=users@geoext.org
href="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: #000000; FONT-FAMILY: 'times new roman', 'new york', 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">I am trying to do search function
following example in this site <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>
</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 name=line1></A><SPAN> var protocol= OpenLayers.Protocol.WFS({
url: "<A href="http://localhost:8080/geoserver/wfs" target=_blank>http://localhost:8080/geoserver/wfs</A>",
featureType: "municipaliteis",
//featureNS: "</SPAN><A href="http://geovista.psu.edu/">http://geovista.psu.edu</A>" I dont know how to fix this line
});
formPanel = new GeoExt.form.FormPanel({
title: "Place Name Search",
height: 150,
region: "north",
protocol: protocol,
items: [{
xtype: "textfield",
width: 200,
name: "name__like",
minLength: 4
},
                xtype: "textfield",
width: 200,
name: "population__ge"
                ],
listeners: {
actioncomplete: function(form, action) {
features = action.response.features;
store.loadData(features);
vm=map.getLayersByName("Results");
if(vm.length===0){
vecLayer = new OpenLayers.Layer.Vector("Results");
map.addLayer(vecLayer);
store.bind(vecLayer);
select.bind(vecLayer);
}
}
},
buttons: [{text: 'search',
handler: function(){
formPanel.search();
}
}],
keys: [{ key: [Ext.EventObject.ENTER],
handler: function() {
formPanel.search();
}
}]
});
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.
Thank in advance
Quang </PRE></DIV>
<DIV style="POSITION: fixed"></DIV></DIV><BR>
<P>
<HR>
<P></P>_______________________________________________<BR>Users mailing
list<BR>Users@geoext.org<BR>http://www.geoext.org/cgi-bin/mailman/listinfo/users<BR></BODY></HTML>