Submit empty string via POST wfs in GeoExt.form.FormPanel

المشرف العام

Administrator
طاقم الإدارة
I have a two textfields in FormPanel. When one of them is empty, after pressing the search button the form sends the empty string in WFS query. How can I disable the empty field which sends the WFS request after I pressed the search button?

formPanel = new GeoExt.form.FormPanel({ ref: "formPanel", width: 300, height: 200, region: "west", protocol: protocol, buttons:[{ text: "search", handler: function() { formPanel.getForm().search(); }, //scope: formPanel }], items: [{ xtype: "textfield", name: "trans_id__eq", value: "", fieldLabel: "ID", disabled: true, ref: 'myTextField' }, { xtype: "textfield", name: "nabywca__eq", value: "", fieldLabel: "nabywca", submitEmptyText: false }, ], 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; app.featureGrid.store.loadData(features); //za

أكثر...
 
أعلى