Application Framework Reference

Module API

setLoadState()

The setLoadState() method changes the current module load state and, optionally, invokes the onLoadStatusChange() event handler.

Synopsis

setLoadState( statusInt , suppressEvent )

Parameters

statusInt

Integer

Dictionary of URI name-value pair GET request params.

suppressEvent

Boolean

Invoke event handler indication:

True = Invoke event handler.

False = (Default) Do not invoke event handler.

Return Value

Undefined

Example

pushContextToChildren: function(explicitContext) {
    this.withEachDescendant(function(module) {
        module.setLoadState(Splunk.util.moduleLoadStates.WAITING_FOR_CONTEXT);
    });  

    this.withEachChild(function(child) {
        child.baseContext = childContext;
        child.setLoadState(Splunk.util.moduleLoadStates.HAS_CONTEXT);
        child.onContextChange();
        child.pushContextToChildren();
        if (!child.isPageLoadComplete()) {
            child.markPageLoadComplete();
        }
    });
    this.setChildContextFreshness(true);
 },
 

See Also

getLoadState()
onLoadStatusChange()
Splunk.util.moduleLoadStates