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
- module:baja
- module:jquery
- module:bajaux/events
- module:bajaux/Widget
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
autoSubscribeis 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
|
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 |
||
resolveParams |
Object |
<optional> |
An Object Literal used for ORD |
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 (unlessautoSubscribe
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