Interface ViewBean
-
- All Superinterfaces:
EnumWebPersistableState
,Persistable
,RequestPersistable
,Transformable
,WebBean
,WebComponent
- All Known Subinterfaces:
RWViewBean
public interface ViewBean extends WebBean
This interface provides a unified concept of the
WebTemplate
encapsulated by correspondingWebViewInstance
along with its associated events for both the report, and report writing document. CustomViewBean
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 theGraphBean
. 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:ReportBean.getViewBean()
. TheReportBean
always encapsulates a template.RWBean.getDataWebBeans(String)
(tentative, and subject to changes). EmbeddedViewBean
in report writing documents may be rendered as grid, graphs or both.RWBean.getDefinitionWebBean(String)
(tentative, and subject to changes). The correspondingWebViewInstance
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
.- Since:
- MicroStrategy Web 8.0.0
- See Also:
ReportBean.getViewBean()
,RWBean.getDataWebBeans(String)
,RWBean.getDefinitionWebBean(String)
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.ThreadLocal<WebHeaders>
expandedRow
-
Fields inherited from interface com.microstrategy.utils.serialization.EnumWebPersistableState
BARE_MINIMAL_STATE_INFO, MAXIMAL_STATE_INFO, MINIMAL_STATE_INFO, TYPICAL_STATE_INFO
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description WebDerivedElements
getDerivedElements(WebAttribute attr)
Returns the derived elements associated with the specified attribute.WebFormat
getFormat(int formatType)
Returns a format object for the given format type.GraphBean
getGraphBean()
Returns aGraphBean
for retrieving graph data.int
getSliceID()
Returns the sliced window ID of the grid graph object.WebViewInstance
getViewInstance()
Returns the underlingWebViewInstance
containing the grid data.int
getViewMode()
Returns whether whether the bean is currently displaying a grid, graph or both.java.lang.String
getViewName()
Returns the view name.int
getVisualizationViewMode()
Returns visualization view modeboolean
isTemplateEmpty()
Returns true if template is emptyvoid
populateObject(WebObjectInfo oi)
Populates objectvoid
setPartialUpdate()
Indicates that the grid and all related units must be partial updated.void
setRedisplay()
Indicates that the grid must be redisplayed.void
setViewMode(int viewMode)
The view mode is a state variable indicating what the bean is currently displaying (i.e. grid, graph or both).void
setVisualizationViewMode(int mode)
Sets visualization view modeboolean
usePageAxisForGrandTotal()
Whether to use Page axis for Grand Total in Percent to Total.-
Methods inherited from interface com.microstrategy.utils.serialization.Persistable
restoreState, restoreState, saveState, saveState, saveState, saveState
-
Methods inherited from interface com.microstrategy.web.beans.RequestPersistable
restoreStateFromRequest, restoreStateFromRequest
-
Methods inherited from interface com.microstrategy.web.beans.Transformable
addTransform, addTransformByClass, addTransformByStyle, addTransformByStyle, clearTransforms, getBeanContext, getMessageString, getMyTransformInstances, getTransformInstance, getTransformInstance, getTransformInstances, getType, hasTransform, hasTransform, invalidateTransformCache, setBeanContext, transform, transform
-
Methods inherited from interface com.microstrategy.web.beans.WebBean
getDocument, getErrorInfo, getSessionInfo, isStale, setSessionInfo, setStale
-
Methods inherited from interface com.microstrategy.web.beans.WebComponent
addChild, addChildStateInfo, addChildStateInfo, collectData, collectMinimalData, generateOutput, getBeanContext, getChild, getChild, getChildByClass, getChildByType, getChildCount, getChildrenByClass, getDefaultStateLevel, getFeaturesManager, getMaximumStateLevel, getName, getOutputFormat, getParent, getPath, getPersistMode, getRenderingFilter, getRoot, getTargetBean, getTargetBeanPath, getWebEvent, getWebEvent, getWebEventHandler, getXMLStatus, handleRequest, hasChanged, hasJustOpened, initBean, invalidateChildrenState, isBeanContextEmpty, isFeatureAvailable, prepareForReuse, removeChild, removeChild, searchChild, setBeanContext, setBeanContext, setChanged, setChanged, setDefaultStateLevel, setFeaturesManager, setName, setOutputFormat, setParent, setPersistMode, setRenderingFilter, setTargetBean, setTargetBeanPath, setWebEventHandler
-
-
-
-
Field Detail
-
expandedRow
static final java.lang.ThreadLocal<WebHeaders> expandedRow
-
-
Method Detail
-
getViewInstance
WebViewInstance getViewInstance() throws WebBeanException
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
-
getGraphBean
GraphBean getGraphBean()
Returns a
GraphBean
for retrieving graph data. Note that this functions independently of the view mode. Although it's possible to obtain aGraphObject
from theWebViewInstance
, aGraphBean
may be saved and restored unlike the former.- Returns:
- the associated
GraphBean
-
getViewMode
int getViewMode()
Returns whether whether the bean is currently displaying a grid, graph or both.
- Returns:
- the view mode in the definition
- See Also:
EnumWebReportViewMode
-
setViewMode
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- See Also:
EnumWebReportViewMode
-
populateObject
void populateObject(WebObjectInfo oi) throws WebBeanException
Populates object- Parameters:
oi
- web object- Throws:
WebBeanException
- Since:
- MicroStrategy Web 8.0.2
-
setVisualizationViewMode
void setVisualizationViewMode(int mode) throws WebBeanException
Sets visualization view mode- Parameters:
mode
- visualization view mode- Throws:
WebBeanException
- Since:
- MicroStrategy Web 8.0.2
-
getVisualizationViewMode
int getVisualizationViewMode() throws WebBeanException
Returns visualization view mode- Returns:
- visualization view mode (see
EnumWebVisualizationViewModes
) - Throws:
WebBeanException
- Since:
- MicroStrategy Web 8.0.2
-
getViewName
java.lang.String getViewName() throws WebBeanException
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.- Since:
- MicroStrategy Web 8.0.2
-
isTemplateEmpty
boolean isTemplateEmpty()
Returns true if template is empty- Returns:
- true if template is empty
- Since:
- MicroStrategy Web 8.1.0
-
getFormat
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
- Since:
- MicroStrategy Web 8.1.1
-
getSliceID
int getSliceID()
Returns the sliced window ID of the grid graph object.- Returns:
- the sliced window ID.
- Since:
- MicroStrategy Web 8.1.1
-
setRedisplay
void setRedisplay()
Indicates that the grid must be redisplayed. This method is meant to be used for grids iside RS documents.
-
setPartialUpdate
void setPartialUpdate()
Indicates that the grid and all related units must be partial updated.
-
getDerivedElements
WebDerivedElements getDerivedElements(WebAttribute attr) throws WebObjectsException, WebBeanException
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- Returns:
WebDerivedElements
- Throws:
WebObjectsException
WebBeanException
-
usePageAxisForGrandTotal
boolean usePageAxisForGrandTotal()
Whether to use Page axis for Grand Total in Percent to Total.- Returns:
- boolean
-
-