Changeset 1194

Show
Ignore:
Timestamp:
10/14/08 11:46:55 (3 months ago)
Author:
fredj
Message:

adapt the mapfish.widgets.search.Form to the new protocols

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/camptocamp/MapFishUnhcr/client/mfbase/mapfish/widgets/search/Form.js

    r1009 r1194  
    2424 * Class: mapfish.widgets.search.Form 
    2525 * Extension of {<Ext.form.FormPanel>} that can be used to interact with a 
    26  * {<mapfish.SearchMediator>}. You have to implement the <getFilter> method 
    27  * and return a filter matching the parameters in the form. 
    28  * 
    29  * TODO: we could also override the sumbmit action and call 
    30  * mediator.triggerSearch() from there. 
     26 * {<mapfish.Protocol.MergeFilterDecorator>}. You have to implement the  
     27 * <getFilter> method and return a filter matching the parameters in the form. 
    3128 */ 
    3229mapfish.widgets.search.Form = function(config) { 
    3330    Ext.apply(this, config); 
    3431 
    35     if (!this.mediator) { 
    36         OpenLayers.Console.error('No mediator available'); 
     32    if (!this.protocol) { 
     33        OpenLayers.Console.error('No protocol available'); 
    3734        return; 
    3835    } 
     
    4441    } 
    4542 
    46     this.mediator.searchers.push(this.searcher); 
     43    this.protocol.register(this.searcher); 
    4744 
    4845    mapfish.widgets.search.Form.superclass.constructor.call(this);