Source: view.js

Septima.Search.View = Septima.Class (
		/**  @lends Septima.Search.View# */
{		
    myController: null,
    
    searchers: null,
    
    hasStarted: false,
		
    /** 
     * 
     * @class Base class for user interface of Septima Search. Implementations must be derived from this class. For an example, please see {@link Septima.Search.DefaultView}
     * @constructs Septima.Search.View
     * @param {Object} options
     * @param [options.limit=15] {Integer} The number of search results to show
     */
	View: function(options){
		if (options === undefined || options.input === undefined){
			throw "Septima.Search.View(options): Options.input is missing."; 
		}
		this.options = options;
		this.limit = 15;
		if (options.limit !== undefined){
			this.limit = options.limit;
		}
		if (options.controller === undefined){
			throw "Septima.Search.View(handlers): controller is missing."; 
		}else{
			this.myController = options.controller;
		}
		this.searchers = this.myController.getSearchers();
		this.draw();
		this.hasStarted = true;
	},

	/**
	 * This method MUST be implemented
	 */
	draw: function(){
		throw("Must be implemented");
	},

	/**
	 * This method MUST be implemented
	 */
	setSuggestions: function(searcherTitle, suggestions){
		throw("Must be implemented");
	},

	/**
	 * This method MUST be implemented
	 */
	setResults: function(results){
		throw("Must be implemented");
	},

	/**
	 * This method MUST be implemented
	 */
	doTextSearch: function(results){
		throw("Must be implemented");
	},
	
	/**
	 * This method MAY be implemented
	 */
	error: function(searcher, errorText){
		
	},
		
	/**
	 * This method MAY be implemented
	 */
	blur: function(){},
	
	CLASS_NAME: 'Septima.Search.View'

});