A specific Ext.form.FormPanel whose internal form is a GeoExt.form.BasicForm instead of Ext.form.BasicForm. One would use this form to do search requests through an OpenLayers.Protocol object (OpenLayers.Protocol.WFS for example).
Look at GeoExt.form.SearchAction to understand how form fields must be named for appropriate filters to be passed to the protocol.
Sample code showing how to use a GeoExt form panel.
var formPanel = new GeoExt.form.FormPanel({
renderTo: "formpanel",
protocol: new OpenLayers.Protocol.WFS({
url: "http://publicus.opengeo.org/geoserver/wfs",
featureType: "tasmania_roads",
featureNS: "http://www.openplans.org/topp"
}),
items: [{
xtype: "textfield",
name: "name__ilike",
value: "mont"
}, {
xtype: "textfield",
name: "elevation__ge",
value: "2000"
}],
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
});
Configuration properties in addition to those listed for Ext.form.FormPanel.
Public methods in addition to those listed for Ext.form.FormPanel.
Parameter: | options – Object The options passed to the GeoExt.form.SearchAction constructor. |
---|
Shortcut to the internal form’s search method.