Hi,

 I am still trying to refine my wfs search and have stumbled upon this problem. 
I can´t see how to link the combo box which defines the search field, to the 
search function ie "foo_like" which is defined in the textfield config.

Could anyone point me in the right direction? How can I make a variable out of 
the selected field and define it as the search criteria ie "var" in the "name 
property...I´m a bit lost.

Thanks,

Rob


// field select
var cmbo_fields = new Ext.data.SimpleStore( {
          fields: ['field1'],
          data : [['bez'],['standort'],['betreiber']],
  autoLoad: true
      });
  
    var features = new Array();
            var formPanel = new GeoExt.form.FormPanel({
            width: 330,
    autoHeight: true,
            region: "west",
            protocol: layer_wea.protocol,
items: [{
xtype: 'combo',
name: 'field1',
fieldLabel: 'Feld',
mode: 'local',
store: cmbo_fields,
emptyText:"Feld selektieren", 
displayField:'field1',
width: 120
},{
                xtype: "textfield",
id:"textfield",
allowBlank: true,
width: 200,
                name: "bez__like",
emptyText:"Suchtext hier eingeben", 
                fieldLabel: "Bezeichnung"
            },{
xtype: 'label',
autoHeight: true,
html:"<i>Die Wildcard Zeichen * und . sind erlaubt.</i>"
}],
            listeners: {
                actioncomplete: function(form, action) {

                    // this listener triggers when the search request
                    // is complete, the OpenLayers.Protocol.Response
                    // resulting from the request is available
                    // through "action.response"
                   features = action.response.features;
                   store_wea.loadData(features);
  
                }
            }
        });
// button to execute search 
        formPanel.addButton({
text: "Suche",
            handler: function() {
                this.search();
            },
            scope: formPanel
        });
// button to reset search
formPanel.addButton({
text: "reset",
            handler: function() {
                var searchtext = Ext.getCmp('textfield');
searchtext.setValue('*');
this.search();
            },
            scope: formPanel
   
        });
        var searchwin = new Ext.Window({
title: "Suche",
        layout: 'fit',
x:300,
        collapsible: true,
        closeAction: 'hide',
        plain: true,
        items: [
formPanel]
    });

      
var searchButton = new Ext.Button({
        id: 'Suche',
        text: 'Suche',
        tooltip: 'Suchen',
        icon: '../images/zoom.png',
        handler: function () {
            searchwin.show();
        }
    });
_______________________________________________
Users mailing list
Users@geoext.org
http://www.geoext.org/cgi-bin/mailman/listinfo/users

Reply via email to