Application Framework Reference

Module API

onContextChange()

The onContextChange() method handles the context change event. The method is called when the underlying context instance available in this.getContext() ha s changed.

Note:This method is intended to be overridden.

Synopsis

onContextChange()

Return Value

Undefined

Example

onContextChange: function() {
    var context = this.getContext();
    var search = context.get('search');
    var new_search = 'index=example sourcetype=documentation';
    search.setBaseSearch(new_search);
    context.set('search', new_search);
},
 

See Also

getContext()
getModifiedContext()
haveResultParamsChanged()
applyContext()
Splunk.Context