[Users] Combination of FeatueStore with FormPanel
Daniel Kastl
orkney at gmx.de
Mon May 25 10:10:31 CEST 2009
>> Then I have a FormPanel and it also works:
>>
>> var heliform = new GeoExt.form.FormPanel({
>> title: 'Search Helicpters',
>> xtype: 'form',
>> protocol: heliStore.proxy.protocol,
>> items : [{
>> xtype : 'fieldset',
>> title : 'Fleet',
>> items : [{
>> xtype : 'combo',
>> fieldLabel : 'Fleet Name',
>> name : 'fleet__like',
>> store: fleetStore, // Defined somewhere before
>> displayField: 'name',
>> mode: 'local',
>> emptyText: 'Select a fleet...'
>> }]
>> }],
>> listeners: {
>> actioncomplete: function(form, action) {
>> // I can see the results herel
>> console.info(action);
>> }
>> }
>> });
>>
>> heliform.addButton({
>> text: 'Find',
>> handler: function() { this.search(); },
>> scope: heliform
>> });
>>
>> My question is how to synchronize the FeatureStore (Vector layer + ExtJS
>> grid) with my search result?
>>
>
> In the actioncomplete listener you can do either
> featuteStore.loadData(features) or vectorLayer.addFeatures(features).
> Both should have the same effect since the store and the layer are
> synchonized.
>
>
Thank you, Eric!
This exactly did what I wanted to do. Very elegant!
More information about the Users
mailing list