bajaux/mixin/subscriberMixIn

A widget that implements this MixIn will be able to
load and subscribe to Components. The MixIn name is 'subscriber'.

Description:
  • A widget that implements this MixIn will be able to
    load and subscribe to Components. The MixIn name is 'subscriber'.

Source:

Requires

Members

(static) target.getSubscriber

Description:
  • Returns this widget's subscriber.

Source:

Returns this widget's subscriber.

Methods

(static) target.destroy() → {Promise}

Description:
  • Overrides the default widget destroy method. This method ensures
    all handlers are removed by the Subscriber when the widget is destroyed.

Source:
See:
Returns:

A promise resolved once everything has been destroyed.

Type
Promise

(static) target.load(value, paramsopt) → {Promise}

Description:
  • Override the default widget load method. Loads a value into the widget.
    If the value is a Component, then it will be subscribed (unless
    autoSubscribe is false).

    This function supports the contract defined in batchLoadMixin.

Source:
See:
Parameters:
Name Type Attributes Description
value *

The value for the Widget to load.

params Object <optional>
Properties
Name Type Attributes Description
batch baja.comm.Batch <optional>

component subscription will
use this batch, if provided

progressCallback function <optional>

a function to be called when
subscription progress occurs

Returns:

A promise that's resolved once the value has been
fully loaded.

Type
Promise

(static) target.resolve(data, resolveParamsopt) → {Promise}

Description:
  • Overrides resolve and injects a Subscriber into the ORD
    resolution so it's subscribed.

Source:
Parameters:
Name Type Attributes Description
data

Specifies some data used to resolve a load value
so load(value) can be called on the widget.

resolveParams Object <optional>

An Object Literal used for ORD
resolution. This parameter is designed to be used internally by bajaux
and shouldn't be used by developers.

Returns:
Type
Promise

(static) target.setEnabled(enabled) → {Promise}

Description:
  • Overrides the default widget setEnabled method. If a widget is enabled
    then a subscription for the value is started (unless autoSubscribe
    returns false). If the value is unsubscribed then an unsubscription for
    the value is attempted.

Source:
See:
Parameters:
Name Type Description
enabled Boolean
Returns:

A promise resolved once the widget is enabled and the
loaded component is subscribed

Type
Promise