Application Framework Reference

Module API

onLoadStatusChange()

The onLoadStatusChange() handler is invoked when the current module load status changes, if the notification has not been suppressed by setLoadState().

The default implementation of this method calls validateHierarchy(), if the module has a context. This method is intended to be overridden.

Synopsis

onLoadStatusChange( status )

Parameters

status

Integer

New load status.

Return Value

Undefined

Example

onLoadStatusChange: function($super, statusInt) {
    $super(statusInt);
    if (statusInt == Splunk.util.moduleLoadStates.LOADED) {
        var context = this.getContext();
        if (context === null) {
            this.logger.warn('getContext could not retrieve a context');
            return;
        }  
        if (context.get("results.dataOverlayMode")) {
            this.onResultsRendered();
        }  
    }  
        else if (statusInt == Splunk.util.moduleLoadStates.WAITING_FOR_HIERARCHY) {
            this.hideDescendants(this.DRILLDOWN_VISIBILITY_KEY + "_" + this.moduleId);
    }  
},
 

See Also

Splunk.util.moduleLoadStates
getLoadState()
setLoadState()
validateHierarchy()