View
pentaho.visual.impl View
The impl.View
class is an optional base class for visualization views which implements the IView
interface.
An application instantiates a view given a specification with the visualization model and the container HTML element.
The first update of the view must be explicitly triggered by a call to model.update
.
Over time, the model may be mutated and, whenever its Update:{do}
event is emitted, the view automatically updates itself.
The view translates user interaction by perform actions
on the model. The standard actions are Select
and Execute
. There are sugar methods on the model to perform these, select
and execute
.
When a view is no longer needed, the application must call its dispose
method, so that the view can free held resources and not cause memory-leaks.
AMD Module
require(["pentaho/visual/impl/View"], function(View) { /* code goes here */ });
Extends
Implements
Constructor
Name | Description |
---|---|
new View(viewSpec) Abstract | Creates a view instance, given its specification. |
Members
Name | Description |
---|---|
PropertyGroups : number Static | The |
domContainer : HTMLElement | Gets the container DOM element where the view is rendered. |
hasUpdatedAll : boolean | Gets a value that indicates if a full update has been done. |
model : pentaho.visual.Model | Gets the visualization model. |
Methods
Name | Description |
---|---|
_subclassed() Static | |
_update(event, action) : Promise | undefined Protected | Updates the view by choosing an appropriate |
_updateAll(event) Protected | Fully renders or updates the view. |
dispose() | Disposes the view by freeing external resources held by the view. |
extend() |
Constructor Details
new View(viewSpec) Abstract | ||||||
---|---|---|---|---|---|---|
Creates a view instance, given its specification. Source: javascript/web/pentaho/visual/impl/View.js, line 82
|
Members Details
PropertyGroups: number Static | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
The
Source: javascript/web/pentaho/visual/impl/View.js, line 420 See also: pentaho.visual.impl.View#__onChangeClassify |
domContainer: HTMLElement |
---|
Gets 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 and class) 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/impl/View.js, line 149 |
hasUpdatedAll: boolean |
---|
Gets a value that indicates if a full update has been done. A full update which is unsuccessful is not accounted for. All updates are full updates until a full update is successful. Source: javascript/web/pentaho/visual/impl/View.js, line 171 |
model: pentaho.visual.Model |
---|
Gets the visualization model. Source: javascript/web/pentaho/visual/impl/View.js, line 158 |
Methods Details
_subclassed() Static |
---|
Source: javascript/web/pentaho/visual/impl/View.js, line 397 |
_update(event, action) : Promise | undefined Protected | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Updates the view by choosing an appropriate The BaseView subclasses should override and implement the Additionally, view subclasses should consider implementing one or more of the optional partial update methods, like Other appropriate combinations of these can also be implemented, for example, Source: javascript/web/pentaho/visual/impl/View.js, line 213
See also: pentaho.visual.impl.View#hasUpdatedAll , pentaho.visual.impl.View#_updateAll , pentaho.visual.impl.View#_updateData , pentaho.visual.impl.View#_updateSize , pentaho.visual.impl.View#_updateSelection , pentaho.visual.impl.View#_updateGeneral |
_updateAll(event) Protected | ||||||
---|---|---|---|---|---|---|
Fully renders or updates the view. The first update of a visualization is always a full update. The default implementation does nothing. Source: javascript/web/pentaho/visual/impl/View.js, line 495
See also: pentaho.visual.impl.View#_update , pentaho.visual.impl.View#hasUpdatedAll , pentaho.visual.impl.View.PropertyGroups |
dispose() |
---|
Disposes the view by freeing external resources held by the view. The default implementation clears the HTML container reference and stops listening to the model's Source: javascript/web/pentaho/visual/impl/View.js, line 345 |
extend() |
---|
Source: javascript/web/pentaho/visual/impl/View.js, line 356 |