[Users] Question about FormPanel

Matt Priour mpriour at kestrelcomputer.com
Sat Nov 27 04:35:50 CET 2010

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.

Without tools like this, you are really just shooting in the dark.

Assuming that all the code below is correct and you are using Geoserver, then you MUST get the featureNS value.
It is pretty easy, just logon to Geoserver and look at the layer list. We'll take the tiger:poi layer as an example.
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:
featureType:'tiger:poi', (that is the layer name with the namespace)
featureNS:'http://www.census.gov' (that is the Workspace URI)

-- OR --

featureType:'poi' (that is the layer name, without the namespace)
featureNS:'tiger' (that is the namespace, which is the same as the Workspace)

the first example is really the 'correct' way, but the second way works as well.

Hope that helps

NOTE: If you are using other servers, like Mapserver, then using namespaces can sometimes cause issues.

Matt Priour

From: truongxuan quang 
Sent: Friday, November 26, 2010 5:28 PM
To: users at geoext.org 
Subject: [Users] Question about FormPanel

Hello List,

I am trying to do search function following example in this site http://ian01.geog.psu.edu/geoserver/www/search/gazetteer.html 

I wrote almost same the above example given, I change only in my data what I istalled in Geoserver 

 var protocol= OpenLayers.Protocol.WFS({
        url: "http://localhost:8080/geoserver/wfs",
        featureType: "municipaliteis",
        //featureNS: "http://geovista.psu.edu" 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;
                    vecLayer = new OpenLayers.Layer.Vector("Results");
        buttons: [{text: 'search',
            handler: function(){
        keys: [{ key: [Ext.EventObject.ENTER], 
            handler: function() {

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 



Users mailing list
Users at geoext.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20101126/ae5723ff/attachment.htm 

More information about the Users mailing list