Class: Controller

Controller

new Controller(searcherRegs, optionsopt)

Parameters:
Name Type Attributes Description
searcherRegs Array.<Septima.Search.Controller.SearcherReg> An array of Septima.Search.Controller.SearcherReg
options Object <optional>
Properties
Name Type Attributes Default Description
onError Septima.Search.Controller~errorCallback <optional>
blankBehavior string <optional>
"none" "none"|"search" Determines whether the controller issues an empty querystring to its searchers
Source:
Example
var controller = new Septima.Search.Controller(
  searcherRegs, // Previously created array of searcherRegs
  {onError : function(searcher, errorThrown) { alert('Error: '+ searcher.getId() + ': '+ errorThrown); },
   blankBehavior: "search"
  }
 );
controller.go();
controller.addSearcher(searcherReg); // Additional searchers may be added to the controller after go();

Methods

addSearcher(searcherReg)

Add a searcher
Parameters:
Name Type Description
searcherReg Septima.Search.Controller.SearcherReg
Source:

go()

Activate View and searchers
Source:

onAddSearcher()

call addSearcher handlers
Source:

onError()

call error handlers
Source:

Type Definitions

SearcherReg

A searcher registration.
Type:
  • Object
Properties:
Name Type Description
title string The title of the searcher as presented in the view
searcher Septima.Search.Searcher An implementation of Septima.Search.Searcher
Source: