Class: Search

Cadcorp.UI.Search

Searches a datastore.
Parameters:
Name Type Description
config Object Configuration for this object. The config supplied directly extends the control

Extends

Members

events

Properties:
Name Type Description
events Cadcorp.Util.Events The events object
Inherited From:

extraResultsToFetch

Properties:
Name Type Description
extraResultsToFetch number The amount results to fetch each time the more data button is clicked
Inherited From:

icon

Properties:
Name Type Description
icon Cadcorp.Icon The icon to display when a result of this search is selected
Inherited From:

initialAmountOfResultsToFetch

Properties:
Name Type Description
initialAmountOfResultsToFetch number The amount of results to fetch the first time a search is performed
Inherited From:

name

Properties:
Name Type Description
name string The name of this search
Inherited From:

nothingFoundText

Properties:
Name Type Description
nothingFoundText string The text to display if no results are found
Inherited From:

serviceUrl

Properties:
Name Type Description
serviceUrl string The url to the webservice
Inherited From:

Methods

moreData()

Performs a search in the webservice using a previously supplied filter.
On success the moredatasucceeded event is raised. On failure the morefailed event is raised
Fires:

newSearch(filter)

Performs a new search in the datasource.
On success the searchsucceeded event is raised. On failure the searchfailed event is raised
Parameters:
Name Type Description
filter string The thing to search for
Fires:

Type Definitions

eventData

Event Data
Type:
  • Object
Properties:
Name Type Description
object Cadcorp.UI.Search The sender of the event
data Array.<Object> The returned data
moreDataAvailable boolean True if more results are available on the server, otherwise false
zoomResolution number The resolution to zoom to, either the zoomResolution or zoomScale must be non null
zoomScale number The scale to zoom to, either the zoomResolution or zoomScale must be non null
epsgCode number The EPSG code for these results

Events

moredatasucceeded

Additional data retrieved successfully
Type:

morefailed

Additional data failed
Type:
  • Object
Properties:
Name Type Description
object Cadcorp.UI.Search The sender of the event

searchfailed

Initial data failed
Type:
  • Object
Properties:
Name Type Description
object Cadcorp.UI.Search The sender of the event

searchsucceeded

Initial data retrieved successfully
Type: