View
pentaho.visual.base.View
This is the base class for views of visualizations.
A container is expected to instantiate a View
given a specification with its main properties, like the container DOM element, the width
, height
and model
. The model may not be immediately valid. Alternatively, the container DOM element can be set at a later time, using pentaho.visual.base.View#domContainer
.
In any case, the first rendering of the view must be explicitly triggered by a call to update
. This two-phase process allows a container application to further configure a view, for example, registering event listeners, before the initial update.
Over time, the view's model is mutated and, in response, the view detects these changes, marks itself as dirty
, and, by default, automatically updates itself.
In response to the user interacting with the view, it may perform actions
, such as the standard actions Select
and Execute
, and emit events for these. Note that standard actions come pre-loaded with the View
class, and can thus be safely constructed synchronously from View derived classes.
All registered visual filter types are pre-loaded and can be safely loaded synchronously.
When a view is no longer needed, the container application must call its dispose
method, so that the view can free held resources and not cause memory-leaks.
AMD Module
require(["pentaho/visual/base/view"], function(View) { /* code goes here */ });
See also: pentaho.visual.base.spec.IView , pentaho.visual.base.spec.IViewType , pentaho.visual.action.Select , pentaho.visual.action.Execute
Extends
Implements
Constructor
Name | Description |
---|---|
new View(viewSpec) Abstract | Creates a visualization |
Classes
Name | Summary |
---|---|
Type | The base class of view types. |
Members
Name | Description |
---|---|
PropertyGroups : Static | The |
$changeset : | Gets the changeset of this instance in the ambient transaction, if any, or |
$hasChanges : | Gets a value that indicates if this instance has any changes in the ambient transaction. |
$isValid : | Determines if this value is a valid instance of its type. |
$key : | Gets the key of the complex value. |
$references : | Gets the references to this container, or |
$type : | Gets the type of this instance. |
$uid : | Gets the unique identifier of the instance. |
$version : | Gets the current version of the instance. |
base : Protected | If a method has been overridden, then the base method provides access to the overridden method. |
domContainer : | Gets or sets the container DOM element where the view is rendered. |
height : | Gets or sets the height that the container application has allocated to display the view without horizontal or vertical scrolling, in pixels. |
isAutoUpdate : | Gets or sets a value that enables or disables automatic updates of the view. |
isDirty : | Gets a value that indicates if the view is in a dirty state. |
isUpdating : | Gets a value that indicates if an update is in progress. |
model : | Gets or sets the visualization model. |
selectionFilter : | Gets or sets the current data selection filter. |
width : | Gets or sets the width that the container application has allocated to display the view without horizontal or vertical scrolling, in pixels. |
Methods
Name | Description |
---|---|
_subclassed() Static | |
createAsync(viewSpec) : Promise.< Static | Creates a view, asynchronously, given its specification. |
getClassAsync(modelType) : Promise.< Static | Gets a promise for the view class (constructor), of the registered default type, if any, for the given model type or identifier. |
_configure(config) Protected | Configures this value with a given non-nully configuration. |
_createChangeset(transaction) : pentaho.type.changes.Changeset Protected | Creates a changeset with this container as owner and returns it. |
_emit(event) : pentaho.lang.Event Protected | Emits an unstructured event and returns it, unless it was canceled. |
_emitGeneric(event, type, phase, keyArgs) : object Protected | Emits an event given an arbitrary payload object, its type and phase. Returns the event payload object, unless the event is canceled. |
_emitSafe(event) : pentaho.lang.Event Protected | Variation of the |
_hasListeners(type, phase) : boolean Protected | Determines if there are any registrations for a given event type and phase. |
_hasObservers(type) : boolean Protected | Determines if there are any registrations for a given event type, for at least one of its phases. |
_init(viewSpec) Protected | Called when the view is constructed. |
_initClone(clone) Protected | Initializes a shallow clone of this container. |
_initContainer() Protected | Initializes a container instance. |
_initDomContainer() Protected | Called to initialize the DOM container, when it is set. |
_initProperties(spec) Protected | Initializes the properties of the complex instance from a the given specification. |
_onActionPhaseDo(action) : Promise Protected | Performs an action's do phase, by calling any registered action |
_onActionPhaseFinally(action) Protected | Performs an action's finally phase, by calling any registered action |
_onActionPhaseInit(action) Protected | Performs an action's initialize phase, by calling any registered action |
_onActionPhaseWill(action) Protected | Performs an action's will phase, by calling any registered action |
_onChangeClassify(dirtyPropGroups, changeset) Protected | Called when the view properties have changed. |
_onChangeDid(changeset) Protected | Called after a changeset has been committed. |
_onChangeDirty(dirtyPropGroups) Protected | Called when a change caused relevant property groups to be marked as dirty. |
_onChangeRejected(changeset, reason) Protected | Called after a changeset has been rejected. |
_onChangeWill(changeset) : pentaho.lang.UserError | undefined Protected | Called before a changeset is committed. |
_onUpdateDid() Protected | Called when an update operation has been performed with success. |
_onUpdateRejected(reason) Protected | Called when an update operation has been canceled or has failed. |
_onUpdateWill() : pentaho.lang.UserError Protected | Called when an update operation is going to be performed. |
_releaseDomContainer() Protected | Called to release any references to the DOM container. |
_updateAll() Protected | Fully renders or updates the view. |
_updateData() Protected | Updates the view, taking into account that only the data-related model properties have changed. |
_updateGeneral() Protected | Updates the view, taking into account that only "general" model properties have changed. |
_updateSelection() Protected | Updates the view, taking into account that only the selection-related model properties have changed. |
_updateSize() Protected | Updates the view, taking into account that only the dimensions of the view have changed. |
act(action) : pentaho.type.action.Base | Executes a given action with this view as its target and does not wait for its outcome. |
actAsync(action) : Promise | Executes a given action in this view as its target and waits for its outcome. |
assertValid() | Ensures that the value is valid, and throws the first validation error if it is not. |
clone() : pentaho.type.Value Abstract | Creates a shallow clone of this value. |
configure(config) : pentaho.type.Value | Configures this value with a given configuration. |
countOf(name, sloppy) : number | Gets the number of values of a given property. |
countRangeOf(name) : pentaho.IRange | Gets the current valid count range of values of a given property. |
dispose() | Disposes the view by freeing external resources held by the view. |
domainOf(name) : Array.< | Gets the current list of valid values of a given property. |
equals(other) : boolean | Determines if a given value, of the same type, represents the same entity. |
extend(source, keyArgs) : Object | Extend an object with the properties of another. |
get(name, sloppy) : pentaho.type.Value | Nully | Gets the value of a property. |
getf(name, sloppy) : string | Gets the string representation of the value of a property. |
getv(name, sloppy) : any | pentaho.type.Complex | pentaho.type.List | Nully | Gets the primitive value of the value of a property. |
isApplicableOf(name) : boolean | Gets a value that indicates if a given property is currently applicable. |
isDefaultedOf(name) : boolean | Gets a value that indicates if a given property has assumed a default value. |
isEnabledOf(name) : boolean | Gets a value that indicates if a given property is currently enabled. |
isRequiredOf(name) : boolean | Gets a value that indicates if a given property is currently required. |
off(typeOrHandle, observer) | Removes one registration given its handle, or all registrations of a given event type (or types) and observer (or listener function). |
on(type, observer, keyArgs) : pentaho.lang.IEventRegistrationHandle | Registers an observer (or listener function) for an event(s) of a given type(s). |
set(name, valueSpec) | Sets the value of a property. |
toJSON() : UJsonValue | Creates a top-level JSON specification that describes this instance. |
toSpec(keyArgs) : pentaho.type.spec.UInstance | Creates a specification that describes this value. |
toSpecInContext(keyArgs) : any | Creates a specification that describes this instance. |
update() : Promise | Updates the view to match its model's latest state. |
validate() : Array.< | Determines if this value is a valid instance of its type. |
Constructor Details
new View(viewSpec) Abstract | ||||||
---|---|---|---|---|---|---|
Creates a visualization Source: javascript/web/pentaho/visual/base/view.js, line 138
See also: pentaho.visual.base.spec.IView , pentaho.visual.base.spec.IViewType , pentaho.visual.action.Select , pentaho.visual.action.Execute |
Members Details
PropertyGroups: Static | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
The
Source: javascript/web/pentaho/visual/base/view.js, line 1329 |
$changeset: |
---|
Gets the changeset of this instance in the ambient transaction, if any, or Source: javascript/web/pentaho/type/mixins/Container.js, line 203 Inherited From: pentaho.type.mixins.Container#$changeset |
$hasChanges: |
---|
Gets a value that indicates if this instance has any changes in the ambient transaction. Source: javascript/web/pentaho/type/mixins/Container.js, line 213 Inherited From: pentaho.type.mixins.Container#$hasChanges |
$isValid: |
---|
Determines if this value is a valid instance of its type. This attribute calls Source: javascript/web/pentaho/type/value.js, line 123 Inherited From: pentaho.type.Value#$isValid |
$key: |
---|
Gets the key of the complex value. The key of a value identifies it among values of the same concrete type. If two values have the same concrete type and their keys are equal, then it must also be the case that The default complex implementation returns the value of the Source: javascript/web/pentaho/type/complex.js, line 195 Inherited From: pentaho.type.Complex#$key |
$references: |
---|
Gets the references to this container, or Note that the returned array may be empty. Do NOT change the returned array or its elements in any way. Source: javascript/web/pentaho/type/mixins/Container.js, line 145 Inherited From: pentaho.type.mixins.Container#$references |
$type: |
---|
Gets the type of this instance. Source: javascript/web/pentaho/type/value.js, line 246 Overrides: pentaho.type.Complex#$type |
$uid: |
---|
Gets the unique identifier of the instance. Source: javascript/web/pentaho/type/mixins/Container.js, line 129 Inherited From: pentaho.type.mixins.Container#$uid |
$version: |
---|
Gets the current version of the instance. Source: javascript/web/pentaho/type/mixins/Container.js, line 177 Inherited From: pentaho.type.mixins.Container#$version |
base: Protected |
---|
If a method has been overridden, then the base method provides access to the overridden method. Can also be called from within a constructor function. Source: javascript/web/pentaho/lang/Base.js, line 299 Inherited From: pentaho.lang.Base#base |
domContainer: |
---|
Gets or sets the container DOM element where the view is rendered. The container element is the viewport through which the view's rendered content is revealed. and is provided empty, for the exclusive use of the view, by the container application. Its content is owned by the view, but its attributes (including style) are owned by the container application and must not be changed by the view. Its size is controlled by the container application and does not need to be the same as that implied by the visual model's It is the responsibility of the container application to clean up the container element's content, if needed, after the view is disposed of. When disposed of, the view has the responsibility of cleaning up any DOM event handlers it may hold on the container element or any of its children. Source: javascript/web/pentaho/visual/base/view.js, line 230 See also: pentaho.visual.base.View#_initDomContainer , pentaho.visual.base.View#_releaseDomContainer |
height: |
---|
Gets or sets the height that the container application has allocated to display the view without horizontal or vertical scrolling, in pixels. This property is required. Source: javascript/web/pentaho/visual/base/view.js, line 1046 |
isAutoUpdate: |
---|
Gets or sets a value that enables or disables automatic updates of the view. When Setting this property to Source: javascript/web/pentaho/visual/base/view.js, line 297 |
isDirty: |
---|
Gets a value that indicates if the view is in a dirty state. A view is dirty during the period after the view's model has changed to until the time the view is updated. During this period, the view should not handle any user interaction events, as the user would be acting on an outdated representation of the model. Source: javascript/web/pentaho/visual/base/view.js, line 331 See also: pentaho.visual.base.View#isAutoUpdate |
isUpdating: |
---|
Gets a value that indicates if an update is in progress. Source: javascript/web/pentaho/visual/base/view.js, line 314 See also: pentaho.visual.base.View#update |
model: |
---|
Gets or sets the visualization model. This property is required. Source: javascript/web/pentaho/visual/base/view.js, line 1095 |
selectionFilter: |
---|
Gets or sets the current data selection filter. This property is required. This property is not serialized by default. To serialize it, specify the argument When set to a filter specification, ATTENTION: The current implementation only supports filters that can be converted to Source: javascript/web/pentaho/visual/base/view.js, line 1067 |
width: |
---|
Gets or sets the width that the container application has allocated to display the view without horizontal or vertical scrolling, in pixels. This property is required. Source: javascript/web/pentaho/visual/base/view.js, line 1031 |
Methods Details
_subclassed() Static |
---|
Source: javascript/web/pentaho/visual/base/view.js, line 1307 |
createAsync(viewSpec) : Promise.< Static | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Creates a view, asynchronously, given its specification. If the view specification has its type annotated inline, a view of that type is built. Otherwise, when the view type is not annotated inline in the specification, if its Unlike the Source: javascript/web/pentaho/visual/base/view.js, line 1240
|
getClassAsync(modelType) : Promise.< Static | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Gets a promise for the view class (constructor), of the registered default type, if any, for the given model type or identifier. Source: javascript/web/pentaho/visual/base/view.js, line 1288
|
_configure(config) Protected | ||||||
---|---|---|---|---|---|---|
Configures this value with a given non-nully configuration. The default implementation does nothing. Source: javascript/web/pentaho/type/value.js, line 178 Inherited From: pentaho.type.Value#_configure
|
_createChangeset(transaction) : pentaho.type.changes.Changeset Protected | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Creates a changeset with this container as owner and returns it. Source: javascript/web/pentaho/type/mixins/Container.js, line 238 Inherited From: pentaho.type.mixins.Container#_createChangeset
|
_emit(event) : pentaho.lang.Event Protected | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Emits an unstructured event and returns it, unless it was canceled. When this method is called, the listeners of existing registrations are notified synchronously, by priority order and then registration order, until either the event is canceled or all of the listeners have been notified. It is safe to register or unregister to/from an event type while it is being emitted. However, changes are only taken into account in subsequent emissions. If a listener function throws an error, the event processing is interrupted. No more registrations are processed and the error is passed to the caller. Source: javascript/web/pentaho/lang/EventSource.js, line 261 Inherited From: pentaho.lang.EventSource#_emit
See also: pentaho.lang.EventSource#_emitSafe , pentaho.lang.EventSource#_emitGeneric |
_emitGeneric(event, type, phase, keyArgs) : object Protected | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Emits an event given an arbitrary payload object, its type and phase. Returns the event payload object, unless the event is canceled. Source: javascript/web/pentaho/lang/EventSource.js, line 313 Inherited From: pentaho.lang.EventSource#_emitGeneric
|
_emitSafe(event) : pentaho.lang.Event Protected | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Variation of the If an event listener throws an error, the following event listeners are still processed. Source: javascript/web/pentaho/lang/EventSource.js, line 283 Inherited From: pentaho.lang.EventSource#_emitSafe
See also: pentaho.lang.EventSource#_emit , pentaho.lang.EventSource#_emitGeneric |
_hasListeners(type, phase) : boolean Protected | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Determines if there are any registrations for a given event type and phase. This method can be used to avoid creating expensive event objects for event type and phase pairs that don't have registrations. Source: javascript/web/pentaho/lang/EventSource.js, line 189 Inherited From: pentaho.lang.EventSource#_hasListeners
Example if(this._hasListeners("select", "will")) { var event = new Event("select", this); if(this._emit(event)) { // Select Will phase } } |
_hasObservers(type) : boolean Protected | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Determines if there are any registrations for a given event type, for at least one of its phases. This method can be used to avoid creating expensive event objects for event types that currently have no registrations. Source: javascript/web/pentaho/lang/EventSource.js, line 232 Inherited From: pentaho.lang.EventSource#_hasObservers
Example if(this._hasObservers("select")) { var event = new Event("select"); if(this._emitGeneric(event, "select", "will")) { // Select Will this._emitGeneric(event, "select", "did"); } } |
_init(viewSpec) Protected | ||||||
---|---|---|---|---|---|---|
Called when the view is constructed. Override this method, from a configuration mixin class, to perform any initialization. Source: javascript/web/pentaho/visual/base/view.js, line 197
|
_initClone(clone) Protected | ||||||
---|---|---|---|---|---|---|
Initializes a shallow clone of this container. The default implementation calls Source: javascript/web/pentaho/type/mixins/Container.js, line 119 Inherited From: pentaho.type.mixins.Container#_initClone
|
_initContainer() Protected |
---|
Initializes a container instance. Source: javascript/web/pentaho/type/mixins/Container.js, line 53 Inherited From: pentaho.type.mixins.Container#_initContainer |
_initDomContainer() Protected |
---|
Called to initialize the DOM container, when it is set. Can be used to initialize the HTML content and/or to attach event handlers. Source: javascript/web/pentaho/visual/base/view.js, line 256 |
_initProperties(spec) Protected | ||||||
---|---|---|---|---|---|---|
Initializes the properties of the complex instance from a the given specification. Source: javascript/web/pentaho/type/complex.js, line 119 Inherited From: pentaho.type.Complex#_initProperties
|
_onActionPhaseDo(action) : Promise Protected | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Performs an action's do phase, by calling any registered action Source: javascript/web/pentaho/visual/base/view.js, line 926
|
_onActionPhaseFinally(action) Protected | ||||||
---|---|---|---|---|---|---|
Performs an action's finally phase, by calling any registered action Source: javascript/web/pentaho/visual/base/view.js, line 937
|
_onActionPhaseInit(action) Protected | ||||||
---|---|---|---|---|---|---|
Performs an action's initialize phase, by calling any registered action Source: javascript/web/pentaho/visual/base/view.js, line 901
|
_onActionPhaseWill(action) Protected | ||||||
---|---|---|---|---|---|---|
Performs an action's will phase, by calling any registered action Source: javascript/web/pentaho/visual/base/view.js, line 912
|
_onChangeClassify(dirtyPropGroups, changeset) Protected | |||||||||
---|---|---|---|---|---|---|---|---|---|
Called when the view properties have changed. The default implementation marks the view as dirty. More specifically, it marks the property groups of the properties affected by the given changeset as dirty. The recognized property groups are those of Implementations can override this method to change the default behavior for some or all of the model and view properties. Source: javascript/web/pentaho/visual/base/view.js, line 382
See also: pentaho.visual.base.View#_updateAll |
_onChangeDid(changeset) Protected | ||||||
---|---|---|---|---|---|---|
Called after a changeset has been committed. The default implementation emits the "did:change" event for the given changeset, if there are any listeners. When overriding, be sure to call the base implementation. Source: javascript/web/pentaho/type/mixins/Container.js, line 290 Overrides: pentaho.type.Complex#_onChangeDid
|
_onChangeDirty(dirtyPropGroups) Protected | ||||||
---|---|---|---|---|---|---|
Called when a change caused relevant property groups to be marked as dirty. The default implementation auto-updates the view, if possible. Source: javascript/web/pentaho/visual/base/view.js, line 424
|
_onChangeRejected(changeset, reason) Protected | |||||||||
---|---|---|---|---|---|---|---|---|---|
Called after a changeset has been rejected. The default implementation emits the "rejected:change" event for the given changeset, if there are any listeners. When overriding, be sure to call the base implementation. Source: javascript/web/pentaho/type/mixins/Container.js, line 311 Inherited From: pentaho.type.mixins.Container#_onChangeRejected
|
_onChangeWill(changeset) : pentaho.lang.UserError | undefined Protected | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Called before a changeset is committed. The default implementation emits the "will:change" event for the given changeset, if there are any listeners. When overriding, be sure to call the base implementation. Source: javascript/web/pentaho/type/mixins/Container.js, line 269 Inherited From: pentaho.type.mixins.Container#_onChangeWill
|
_onUpdateDid() Protected |
---|
Called when an update operation has been performed with success. The The default implementation emits the The implementation or the event listeners are allowed to modify the model and thus possibly start new updates from the did phase. If an implementation throws an error, the error is logged and the update operation is still considered successful. Source: javascript/web/pentaho/visual/base/view.js, line 743 Fires: event:did:update |
_onUpdateRejected(reason) Protected | ||||||
---|---|---|---|---|---|---|
Called when an update operation has been canceled or has failed. The The default implementation emits the The implementation or the event listeners are allowed to modify the model and thus possibly start new updates from the rejected phase. If an implementation throws an error, the error is logged and the update operation is still rejected with the original error. Source: javascript/web/pentaho/visual/base/view.js, line 769
Fires: event:rejected:update |
_onUpdateWill() : pentaho.lang.UserError Protected | ||||
---|---|---|---|---|
Called when an update operation is going to be performed. The default implementation emits the Either the implementation or the event listeners are allowed to cancel the update or further modify the model. The implementation can cancel the update by returning or throwing an error. Source: javascript/web/pentaho/visual/base/view.js, line 587 Fires: event:will:update
|
_releaseDomContainer() Protected |
---|
Called to release any references to the DOM container. It is the responsibility of the container application to clean up the container element's content, when it is no longer needed. On the other hand, it is the responsibility of the view to clean up any DOM event handlers or references it may hold on the container element or any of its children. Currently, this method is automatically called from the The default implementation clears the DOM container property and unregisters from any DOM events. If an implementation has additional properties containing DOM nodes, or other attached DOM event handlers, then it must override this method (and call base) and set these properties to Source: javascript/web/pentaho/visual/base/view.js, line 280 |
_updateAll() Protected |
---|
Fully renders or updates the view. The first update of a visualization is always a full update. The default implementation does nothing. Implementations should override this method and implement a complete rendering of the visualization. Besides implementing this method, implementations should consider implementing one or more of the optional partial update methods, like Other appropriate combinations of these can also be implemented, for example, The Source: javascript/web/pentaho/visual/base/view.js, line 1425 See also: pentaho.visual.base.View#update , pentaho.visual.base.View.PropertyGroups , pentaho.visual.base.View#_onChangeClassify |
_updateData() Protected |
---|
Updates the view, taking into account that only the data-related model properties have changed. This is an optional method - there is no base implementation. Implement this method to provide a faster way to update the data displayed by the view. When not specified, and no other applicable partial update method exists, the view is updated using the Source: javascript/web/pentaho/visual/base/view.js, line 1464 See also: pentaho.visual.base.View#_updateAll |
_updateGeneral() Protected |
---|
Updates the view, taking into account that only "general" model properties have changed. This is an optional method - there is no base implementation. Implement this method to provide a faster way to update the "general information" displayed by the view. When not specified, and no other applicable partial update method exists, the view is updated using the Source: javascript/web/pentaho/visual/base/view.js, line 1482 See also: pentaho.visual.base.View#_updateAll |
_updateSelection() Protected |
---|
Updates the view, taking into account that only the selection-related model properties have changed. This is an optional method - there is no base implementation. Implement this method to provide a faster way to update the selection of the view. When not specified, and no other applicable partial update method exists, the view is updated using the Source: javascript/web/pentaho/visual/base/view.js, line 1446 See also: pentaho.visual.base.View#_updateAll |
_updateSize() Protected |
---|
Updates the view, taking into account that only the dimensions of the view have changed. This is an optional method - there is no base implementation. Implement this method to provide a faster way to resize a view. When not specified, and no other applicable partial update method exists, the full Source: javascript/web/pentaho/visual/base/view.js, line 1428 See also: pentaho.visual.base.View#_updateAll |
act(action) : pentaho.type.action.Base | ||
---|---|---|
Executes a given action with this view as its target and does not wait for its outcome. Emits a structured event of a type equal to the action type's id, with the action as event payload, for each of the action's phases. This method can be given Source: javascript/web/pentaho/visual/base/view.js, line 829 |
Name | Default Value | Summary |
---|---|---|
action : pentaho.type.action.Base | The action to execute. |
Name | Description |
---|---|
pentaho.type.action.Base | The given action. |
See also: pentaho.visual.base.View#actAsync
Example
define(function() { // ... // Listen to the execute event view.on("pentaho/visual/action/execute", { do: function(action) { var dataFilter = action.dataFilter; alert("Executed on rows where " + (dataFilter && dataFilter.contentKey)); // Mark action as done. action.done(); } }); // ... // Act "execute" on data rows that have "country" = "us". view.act({ _: "pentaho/visual/action/execute", dataFilter: { _: "isEqual", p: "country", v: "us" } }); });
actAsync(action) : Promise | ||
---|---|---|
Executes a given action in this view as its target and waits for its outcome. Emits a structured event of a type equal to the action type's id, with the action as event payload, for each of the action's phases. This method can be given Source: javascript/web/pentaho/visual/base/view.js, line 859 |
Name | Default Value | Summary |
---|---|---|
action : pentaho.type.action.Base | The action to execute. |
Name | Description |
---|---|
Promise | A promise that is fulfilled with the action's |
See also: pentaho.visual.base.View#act
assertValid() | ||||
---|---|---|---|---|
Ensures that the value is valid, and throws the first validation error if it is not. This method calls the Source: javascript/web/pentaho/type/value.js, line 152 Inherited From: pentaho.type.Value#assertValid
|
clone() : pentaho.type.Value Abstract | ||||
---|---|---|---|---|
Creates a shallow clone of this value. Source: javascript/web/pentaho/type/value.js, line 86 Inherited From: pentaho.type.Value#clone
|
configure(config) : pentaho.type.Value | ||
---|---|---|
Configures this value with a given configuration. Source: javascript/web/pentaho/type/value.js, line 165 Inherited From: pentaho.type.Value#configure |
Name | Default Value | Summary |
---|---|---|
config : any | The configuration. |
Name | Description |
---|---|
pentaho.type.Value | This instance. |
countOf(name, sloppy) : number | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Gets the number of values of a given property. When the specified property is a list property, its When the specified property is not a list property, Source: javascript/web/pentaho/type/complex.js, line 383 Inherited From: pentaho.type.Complex#countOf
|
countRangeOf(name) : pentaho.IRange | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Gets the current valid count range of values of a given property. Source: javascript/web/pentaho/type/complex.js, line 433 Inherited From: pentaho.type.Complex#countRangeOf
|
dispose() |
---|
Disposes the view by freeing external resources held by the view. The default implementation calls Source: javascript/web/pentaho/visual/base/view.js, line 948 |
domainOf(name) : Array.< | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Gets the current list of valid values of a given property. Source: javascript/web/pentaho/type/complex.js, line 466 Inherited From: pentaho.type.Complex#domainOf
|
equals(other) : boolean | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Determines if a given value, of the same type, represents the same entity. The default implementation delegates the operation to the Source: javascript/web/pentaho/type/value.js, line 107 Inherited From: pentaho.type.Value#equals
See also: pentaho.type.Value#$key , pentaho.type.Value.Type#areEqual |
extend(source, keyArgs) : Object | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Extend an object with the properties of another. Methods that are overridden are accessible through This object is extended, but its class doesn't change. Source: javascript/web/pentaho/lang/Base.js, line 1037 Overrides: pentaho.type.Complex#extend
|
get(name, sloppy) : pentaho.type.Value | Nully | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Gets the value of a property. If the specified property is not defined and A list property always has a non-null value, possibly an empty list, but never Source: javascript/web/pentaho/type/complex.js, line 219 Inherited From: pentaho.type.Complex#get
See also: pentaho.type.Complex#getv , pentaho.type.Complex#getf |
getf(name, sloppy) : string | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Gets the string representation of the value of a property. This method reads the value of the property by calling When the latter returns a For a Source: javascript/web/pentaho/type/complex.js, line 310 Inherited From: pentaho.type.Complex#getf
See also: pentaho.type.Complex#get , pentaho.type.Complex#getv |
getv(name, sloppy) : any | pentaho.type.Complex | pentaho.type.List | Nully | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Gets the primitive value of the value of a property. This method reads the value of the property by calling When the latter does not return a For a Source: javascript/web/pentaho/type/complex.js, line 281 Inherited From: pentaho.type.Complex#getv
See also: pentaho.type.Complex#get , pentaho.type.Complex#getf |
isApplicableOf(name) : boolean | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Gets a value that indicates if a given property is currently applicable. Source: javascript/web/pentaho/type/complex.js, line 403 Inherited From: pentaho.type.Complex#isApplicableOf
|
isDefaultedOf(name) : boolean | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Gets a value that indicates if a given property has assumed a default value. Source: javascript/web/pentaho/type/complex.js, line 230 Inherited From: pentaho.type.Complex#isDefaultedOf
|
isEnabledOf(name) : boolean | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Gets a value that indicates if a given property is currently enabled. Source: javascript/web/pentaho/type/complex.js, line 418 Inherited From: pentaho.type.Complex#isEnabledOf
|
isRequiredOf(name) : boolean | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Gets a value that indicates if a given property is currently required. A property is currently required if its current Source: javascript/web/pentaho/type/complex.js, line 451 Inherited From: pentaho.type.Complex#isRequiredOf
|
off(typeOrHandle, observer) | ||
---|---|---|
Removes one registration given its handle, or all registrations of a given event type (or types) and observer (or listener function). To remove an event registration, it is sufficient to call the It is safe to unregister from an event type while it is being emitted. However, any registrations removed during the current emission will still execute. Specifying an event registration handle that has already been disposed of has no effect. Specifying an event type and observer (or listener function) that have no registrations has no effect. Source: doc-js/pentaho/lang/IEventSource.jsdoc, line 131 Inherited From: pentaho.lang.EventSource#off |
Name | Default Value | Summary |
---|---|---|
typeOrHandle : nonEmptyString | Array.< | pentaho.lang.IEventRegistrationHandle | The type or types of events, or an event registration handle to dispose of. When a string, it can be a comma-separated list of event types. | |
observer : pentaho.lang.IEventObserver | pentaho.lang.EventListener | pentaho.lang.EventListenerAsync | The event observer (or listener function). Required when |
See also: pentaho.lang.IEventSource#on
on(type, observer, keyArgs) : pentaho.lang.IEventRegistrationHandle | ||||||||
---|---|---|---|---|---|---|---|---|
Registers an observer (or listener function) for an event(s) of a given type(s). Optionally, a listening priority may be specified to adjust the order by which an observer is notified, relative to other listeners. Note that if an observer is registered more than once to the same event type, a new registration is created each time and its listeners will be called once per registration. It is safe to register for an event type while it is being emitted. However, new registrations are only taken into account in subsequent emissions. When This method is compatible with the dojo/on API. Source: doc-js/pentaho/lang/IEventSource.jsdoc, line 90 Inherited From: pentaho.lang.EventSource#on |
Name | Default Value | Summary | ||||||
---|---|---|---|---|---|---|---|---|
type : nonEmptyString | Array.< | The type or types of events. When a string, it can be a comma-separated list of event types. | |||||||
observer : pentaho.lang.IEventObserver | pentaho.lang.EventListener | pentaho.lang.EventListenerAsync | The event observer (or listener function). | |||||||
keyArgs : object Optional | Keyword arguments.
|
Name | Description |
---|---|
pentaho.lang.IEventRegistrationHandle | An event registration handle that can be used for later removal. |
See also: pentaho.lang.IEventSource#off
set(name, valueSpec) | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Sets the value of a property. Source: javascript/web/pentaho/type/complex.js, line 328 Inherited From: pentaho.type.Complex#set
Fires: event:will:change , event:did:change , event:rejected:change
|
toJSON() : UJsonValue | ||||
---|---|---|---|---|
Creates a top-level JSON specification that describes this instance. Attributes which do not have a JSON-compatible specification are omitted. Specifically, for inline types, attributes with a function value are not supported. This method simply calls Source: javascript/web/pentaho/type/instance.js, line 210 Inherited From: pentaho.type.Instance#toJSON
See also: pentaho.type.Instance#toSpec |
toSpec(keyArgs) : pentaho.type.spec.UInstance | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Creates a specification that describes this value. If an Source: javascript/web/pentaho/type/value.js, line 184 Inherited From: pentaho.type.Value#toSpec |
Name | Default Value | Summary | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
keyArgs : Object Optional | The keyword arguments object. Passed to every value and type serialized within this scope. Please see the documentation of value subclasses for information on additional, supported keyword arguments.
|
Name | Description |
---|---|
pentaho.type.spec.UInstance | A specification of this value. |
toSpecInContext(keyArgs) : any | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Creates a specification that describes this instance. Source: javascript/web/pentaho/type/instance.js, line 190 Overrides: pentaho.type.Complex#toSpecInContext
See also: pentaho.type.Instance#toSpec |
update() : Promise | ||||
---|---|---|---|---|
Updates the view to match its model's latest state. When The update operation is generally asynchronous. Even if the view implementation completes its update synchronously, the completion is only advertised asynchronously, through the emission of one of the events The If the view is not currently updating and is also not Otherwise, by this time, Will phaseInitially, the If the update is canceled, the update is rejected with the cancel reason, and enters the Rejected phase. Loop phaseIf the update is not canceled, the view enters an update loop that only ends when either the view is up to date with the model (in which case surely On each iteration of the update loop:
Over the view's lifetime, the very first "partial" update method that is selected is always the full update method: Did phaseThe The The implementation or the event listeners are allowed to modify the model and thus trigger new updates while in the did phase. Lastly, the returned promise is fulfilled. Rejected phaseThe The The implementation or the event listeners are allowed to modify the model and thus trigger new updates while in the rejected phase. Lastly, the returned promise is rejected with the original error. Source: javascript/web/pentaho/visual/base/view.js, line 540 Fires: event:will:update , event:rejected:update , event:did:update
See also: pentaho.visual.base.View#isAutoUpdate , pentaho.visual.base.View#isUpdating , pentaho.visual.base.View#isDirty , pentaho.visual.base.View#_updateAll , pentaho.visual.base.View#_updateData , pentaho.visual.base.View#_updateSize , pentaho.visual.base.View#_updateSelection , pentaho.visual.base.View#_updateGeneral , pentaho.visual.base.View#_onUpdateWill , pentaho.visual.base.View#_onUpdateDid , pentaho.visual.base.View#_onUpdateRejected |
validate() : Array.< | ||||
---|---|---|---|---|
Determines if this value is a valid instance of its type. The default implementation delegates to Source: javascript/web/pentaho/type/value.js, line 137 Inherited From: pentaho.type.Value#validate
See also: pentaho.type.Value#$isValid |