<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial, helvetica, sans-serif;font-size:10pt;color:#000000;"><div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">Hi,</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> 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.</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">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.</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">Thanks,</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">Rob</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">        // field select</font></span></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span
class="Apple-tab-span" style="white-space:pre">        </span>var cmbo_fields = new Ext.data.SimpleStore( {</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> fields: ['field1'],</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> data : [['bez'],['standort'],['betreiber']],</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                </span> autoLoad: true</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> <span class="Apple-tab-span" style="white-space:pre">        </span> });</font></div><div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">                </font></span></div><div><font
class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">        </span> </font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">        </span> var features = new Array();</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> var formPanel = new GeoExt.form.FormPanel({</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> width: 330,</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">        </span> autoHeight: true,</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">
region: "west",</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> protocol: layer_wea.protocol,</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                        </span>items: [{</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                                        </span>xtype: 'combo',</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                                        </span>name: 'field1',</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                                        </span>fieldLabel: 'Feld',</font></div><div><font class="Apple-style-span" face="arial, helvetica,
sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                                        </span>mode: 'local',</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                                        </span>store: cmbo_fields,</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                                        </span>emptyText:"Feld selektieren", </font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                                        </span>displayField:'field1',</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                                        </span>width: 120</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span"
style="white-space:pre">                                        </span>},{</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> <span class="Apple-tab-span" style="white-space:pre">                        </span>xtype: "textfield",</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                                        </span>id:"textfield",</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                                        </span>allowBlank: true,</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                                        </span>width: 200,</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> <span
class="Apple-tab-span" style="white-space:pre">                        </span>name: "bez__like",</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                                        </span>emptyText:"Suchtext hier eingeben", </font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> <span class="Apple-tab-span" style="white-space:pre">        </span>fieldLabel: "Bezeichnung"</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> <span class="Apple-tab-span" style="white-space:pre">                </span> },{</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                                </span>xtype: 'label',</font></div><div><font class="Apple-style-span" face="arial, helvetica,
sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                                </span>autoHeight: true,</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                                </span>html:"<i>Die Wildcard Zeichen * und . sind erlaubt.</i>"</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                                </span>}],</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> listeners: {</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> actioncomplete: function(form, action) {</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font
class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> // this listener triggers when the search request</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> // is complete, the OpenLayers.Protocol.Response</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> // resulting from the request is available</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> // through "action.response"</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">
features = action.response.features;</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> store_wea.loadData(features);</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                                </span> </font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> }</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> }</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> });</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">        
        </span>// button to execute search </font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> formPanel.addButton({</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                        </span>text: "Suche",</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> handler: function() {</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> this.search();</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> },</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> scope:
formPanel</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> });</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                </span>// button to reset search</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                </span>formPanel.addButton({</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                        </span>text: "reset",</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> handler: function() {</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">
var searchtext = Ext.getCmp('textfield');</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                                </span>searchtext.setValue('*');</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                                </span>this.search();</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> },</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> scope: formPanel</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                        </span> </font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">
});</font></div><div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">        </font></span></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> var searchwin = new Ext.Window({</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                </span>title: "Suche",</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> layout: 'fit',</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                </span>x:300,</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> collapsible: true,</font></div><div><font
class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> closeAction: 'hide',</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> plain: true,</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> items: [</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                </span>formPanel]</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> });</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> </font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif"
size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>var searchButton = new Ext.Button({</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> id: 'Suche',</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> text: 'Suche',</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> tooltip: 'Suchen',</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> icon: '../images/zoom.png',</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> handler: function () {</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> <span
class="Apple-tab-span" style="white-space:pre">        </span>searchwin.show();</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> }</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> });</font></div></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; position: fixed; "></div>
</div></body></html>