[Users] Search tool in Geoext App

Robert Buckley robertdbuckley at yahoo.com
Tue Mar 22 11:49:06 CET 2011


I have used the following code and get a good result, but the exact string has 
to be entered. I know I need to somehow user a filter with LIKE but don´t know 
where I should code this..Definate lack of examples.

could anone tell me how I would basically use the LIKE filter and put the 
results into a grid?

yours,

Rob

// search
var formPanel = new GeoExt.form.FormPanel({
//    renderTo: "formpanel",
    protocol: new OpenLayers.Protocol.WFS({
        url: "http://MyDomain:8080/geoserver/wfs",
        featureType: "wea_wgs84",
        featureNS: "http://MyDomain/postgis"
    }),
    region: "west",

    width: 400,
    border: false,
    items: [{
        xtype: "textfield",
        name: "bez",
        value: "WF"
    }, {
        xtype: "textfield",
        name: "standort",
        value: "Asse"
    }],
    listeners: {
        actioncomplete: function(form, action) {
            // this listener triggers when the search request
            // is complete, the OpenLayers.Protocol.Response
            // resulting from the request is available
            // in "action.response"
            
        }
    }
});

formPanel.addButton({
    text: "search",
    handler: function() {
        this.search();
    },
    scope: formPanel
});




________________________________
Von: Robert Buckley <robertdbuckley at yahoo.com>
An: users at geoext.org
Gesendet: Dienstag, den 22. März 2011, 8:10:23 Uhr
Betreff: [Users] Search tool in Geoext App


Hi,

I am building a series of basic webviewers which will basically just load wms 
intoa viewport and offer the user navigation tools, a quick zoom combobox, 
legend panel and contents panel.
I have come this far and it is now been asked if I can build a simple search 
mechanism. 

I would like to offer the user a combobox to first pick the layer, then the 
field, then then either enter a word or get a list of entries coming from that 
field.

I believe I have seen something similar in other apps and that it is possible to 
build something like this, but I don´t know where to find any code examples.

Is it true that this search would have to be based on wfs and that a search on 
wms isn´t possible?
Could anyone offer me any help regarding this search  mechanism?

thanks for any tips,

Robert

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20110322/dd428243/attachment.htm 


More information about the Users mailing list