public interface

ViewBean

implements WebBean
com.microstrategy.web.beans.ViewBean
Known Indirect Subclasses

Class Overview

This interface provides a unified concept of the WebTemplate encapsulated by corresponding WebViewInstance along with its associated events for both the report, and report writing document. Custom ViewBean transforms and event handlers will work with traditional reports and the newer report writing document.

It is used to manage and render grid data defined by the underlying template in the WebViewInstance, and graph data encapsulated by the GraphBean. It also provides methods to track user states (e.g. view mode).

The ViewBean cannot exist on its own accord - only as part of the following:

  • getViewBean(). The ReportBean always encapsulates a template.
  • getDataWebBeans(String) (tentative, and subject to changes). Embedded ViewBean in report writing documents may be rendered as grid, graphs or both.
  • getDefinitionWebBean(String) (tentative, and subject to changes). The corresponding WebViewInstance instances here only contain template information, but no data. Useful representation in design mode.

The ViewBean cannot be saved and restored on its own. It cannot be instantiated from the WebBeanFactory.

Summary

[Expand]
Inherited Constants
From interface com.microstrategy.utils.serialization.EnumWebPersistableState
Fields
public static final ThreadLocal<WebHeaders> expandedRow
Public Methods
abstract WebDerivedElements getDerivedElements(WebAttribute attr)
Returns the derived elements associated with the specified attribute.
abstract WebFormat getFormat(int formatType)
Returns a format object for the given format type.
abstract GraphBean getGraphBean()

Returns a GraphBean for retrieving graph data.

abstract int getSliceID()
Returns the sliced window ID of the grid graph object.
abstract WebViewInstance getViewInstance()

Returns the underling WebViewInstance containing the grid data.

abstract int getViewMode()

Returns whether whether the bean is currently displaying a grid, graph or both.

abstract String getViewName()
Returns the view name.
abstract int getVisualizationViewMode()
Returns visualization view mode
abstract boolean isTemplateEmpty()
Returns true if template is empty
abstract void populateObject(WebObjectInfo oi)
Populates object
abstract void setPartialUpdate()
Indicates that the grid and all related units must be partial updated.
abstract void setRedisplay()
Indicates that the grid must be redisplayed.
abstract void setViewMode(int viewMode)

The view mode is a state variable indicating what the bean is currently displaying (i.e. grid, graph or both).

abstract void setVisualizationViewMode(int mode)
Sets visualization view mode
abstract boolean usePageAxisForGrandTotal()
Whether to use Page axis for Grand Total in Percent to Total.
[Expand]
Inherited Methods
From interface com.microstrategy.utils.serialization.Persistable
From interface com.microstrategy.web.beans.RequestPersistable
From interface com.microstrategy.web.beans.Transformable
From interface com.microstrategy.web.beans.WebBean
From interface com.microstrategy.web.beans.WebComponent

Fields

public static final ThreadLocal<WebHeaders> expandedRow

Public Methods

public abstract WebDerivedElements getDerivedElements (WebAttribute attr)

Returns the derived elements associated with the specified attribute. For view report and RWGridGraph the Derived Elements are defined in view template, while for other type report the Derived Elements are defined in Data template.

Parameters
attr the attribute with Derived Elements
Throws
WebObjectsException}, {@link WebBeanException)
WebBeanException
WebObjectsException

public abstract WebFormat getFormat (int formatType)

Returns a format object for the given format type. Note: returns null for reports

Parameters
formatType format type (a value from @link com.microstrategy.web.objects.rw.EnumRWFormatTypes)
Returns
  • WebFormat

public abstract GraphBean getGraphBean ()

Returns a GraphBean for retrieving graph data. Note that this functions independently of the view mode. Although it's possible to obtain a GraphObject from the WebViewInstance, a GraphBean may be saved and restored unlike the former.

Returns
  • the associated GraphBean

public abstract int getSliceID ()

Returns the sliced window ID of the grid graph object.

Returns
  • the sliced window ID.

public abstract WebViewInstance getViewInstance ()

Returns the underling WebViewInstance containing the grid data.

Returns
  • the underlying WebViewInstance
Throws
WebBeanException if there is a problem obtaining the data from the Intelligence Server, or a problem with the data itself

public abstract int getViewMode ()

Returns whether whether the bean is currently displaying a grid, graph or both.

Returns
  • the view mode in the definition

public abstract String getViewName ()

Returns the view name.

Returns
  • the name of the View. It returns the display name for the view bean in case of RW documents or the report name for the case for reports.
Throws
WebBeanException thrown if the object name can be retrieved.

public abstract int getVisualizationViewMode ()

Returns visualization view mode

Returns
Throws
WebBeanException
WebBeanException

public abstract boolean isTemplateEmpty ()

Returns true if template is empty

Returns
  • true if template is empty

public abstract void populateObject (WebObjectInfo oi)

Populates object

Parameters
oi web object
Throws
WebBeanException
WebBeanException

public abstract void setPartialUpdate ()

Indicates that the grid and all related units must be partial updated.

public abstract void setRedisplay ()

Indicates that the grid must be redisplayed. This method is meant to be used for grids iside RS documents.

public abstract void setViewMode (int viewMode)

The view mode is a state variable indicating what the bean is currently displaying (i.e. grid, graph or both). It is intended for book-keeping purposes, and does not actually affect data retrieval.

Parameters
viewMode the new view mode

public abstract void setVisualizationViewMode (int mode)

Sets visualization view mode

Parameters
mode visualization view mode
Throws
WebBeanException
WebBeanException

public abstract boolean usePageAxisForGrandTotal ()

Whether to use Page axis for Grand Total in Percent to Total.

Returns
  • boolean