Class ReportGridCellRowTitleImpl
- java.lang.Object
-
- com.microstrategy.web.app.transforms.AbstractReportGridDisplayCell
-
- com.microstrategy.web.app.transforms.AbstractReportGridCellTitle
-
- com.microstrategy.web.app.transforms.ReportGridCellRowTitleImpl
-
- All Implemented Interfaces:
ReportGridCellRowTitle,ReportGridCellTitle,ReportGridDisplayCell,java.lang.Cloneable
- Direct Known Subclasses:
ReportGridExcelCellRowTitleImpl
public class ReportGridCellRowTitleImpl extends AbstractReportGridCellTitle implements ReportGridCellRowTitle
The
ReportGridCellRowTitleImplis used to generate the HTML of a cell of that is a title of the row axis.This class can handle two different types of
SDKobjects:WebTitle: used in view mode, this is the SDK object that represents a title of the row axis.WebSubTitle: used in view mode when attribute forms are being displayed, for each attribute form there will be a corresondingWebSubTitle.WebTemplateUnit: used in design mode, this is the SDK object used in a template for the row axis.
The
ReportGridCellRowTitleImplextends theAbstractReportGridDisplayCellwhich controls the exeuction flow.Users who intend to programatically modify the HTML generated for a row title should extend this class. Using this technique developers could define their own rules of the text to display based on the
The following is an example of a class that extends theWebTitlecontent.AbstractReportGridDisplayCell.generateText(com.microstrategy.web.beans.MarkupOutput)method of this class based on the title's template unit type:public class CustomColTitle extends ReportGridCellRowTitleImpl { public void generateText(MarkupOutput mo) { WebTitle title = getWebTitle(); if (title.getWebTemplateUnit() != null) { WebTemplateUnit unit = title.getWebTemplateUnit(); if (unit.getUnitType() == EnumDSSXMLTemplateUnitType.DssXmlTemplateMetrics) { mo.append(getDescriptor(1158)); // Descriptor: Metrics } else if (unit.getUnitType() == EnumDSSXMLTemplateUnitType.DssXmlTemplateDimension && title.getGridSubTitles().size() > 0) { mo.append(HTMLHelper.encode(title.getGridSubTitles().get(0).getName())); } else { mo.append(HTMLHelper.encode(unit.getAlias())); } } else if (title.getTarget() != null) { mo.append(HTMLHelper.encode(title.getTarget().getName())); } else { super.generateText(mo); } } }- Since:
- MicroStrategy Web 7.5.1
- See Also:
ReportGridDisplayCell,ReportGridTransformImpl
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.microstrategy.web.app.transforms.AbstractReportGridCellTitle
AbstractReportGridCellTitle.TitlePivotButtonInfo
-
Nested classes/interfaces inherited from class com.microstrategy.web.app.transforms.AbstractReportGridDisplayCell
AbstractReportGridDisplayCell.Context, AbstractReportGridDisplayCell.PivotButtonInfo
-
Nested classes/interfaces inherited from interface com.microstrategy.web.app.transforms.ReportGridDisplayCell
ReportGridDisplayCell.Context
-
-
Field Summary
-
Fields inherited from class com.microstrategy.web.app.transforms.AbstractReportGridDisplayCell
_advDrillEditorProcessEvent, _advdrillEvent, _appliedColSorts, _appliedSorts, _blankDrillAnchorTag, _cachedObjects, _drillEditorName, _drillEditorProcessEvent, _drillEvent, _drillFilterOnSelectionProcessEvent, _imgBasePath, _isIFrameRequest, _isNetscape, _isWrapHeaderText, _itemsAddedToContextMenu, _maxColHeaderDepth, _pivotImgHeight, _pivotImgWidth, _sharedCellProperties, _sortEvent, _sortImgHeight, _sortImgWidth, _sortSubtotalColPosition, _sortSubtotalPosition, _sortSubtotalPostion, _specifyIDForCell, _specifyWidthForCell, _text, _typicalURLBeanState, DISPLAY_CELL_CLASS, formalParas, NO, rb, RETAIN_PARENT_FORMAL_PARAMETER, RETAIN_THRESHOLDS_FORMAL_PARAMETER, YES
-
Fields inherited from interface com.microstrategy.web.app.transforms.ReportGridCellRowTitle
SORT_TYPE_ASCENDING, SORT_TYPE_DESCENDING
-
Fields inherited from interface com.microstrategy.web.app.transforms.ReportGridDisplayCell
PIVOT_DECREASE_POSITION, PIVOT_INCREASE_POSITION, PIVOT_REMOVE, PIVOT_SWITCH_AXIS, PIVOT_TO_PAGE_BY
-
-
Constructor Summary
Constructors Constructor Description ReportGridCellRowTitleImpl()Constructor used for creating a generic display cell.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidappendContextMenuItems(ContextMenu rhMenu)Deprecated.Please use the new approach for generating context menus, seeReportCellRemoveFromGrid,ReportCellMove, etcbooleancanAddThresholds()Utility methood for determining if the cell object is enabled for displaying the user the option to add threshold to itprotected voidgeneratePivotButtons(MarkupOutput mo)Calls forAbstractReportGridCellTitle.generatePivotButton(int)for each one of the buttons this instance normally supportsprotected TaggenerateSortButton()Generate the sort button tag information for this objectprotected voidgenerateSortButton(MarkupOutput mo)Deprecated.usegenerateSortButton()instead.protected WebGridDatagetGridData()WebEventgetSortEvent(int type)Get theWebEventinstance with the information for sorting the current cell valuesprotected java.lang.StringgetSortID()This method return the ID to use for sorting this cell.protected booleanhasWebObject()This method allows the abstract class to identify whether the cell has been initialized with a valid WebObject.voidinit(TransformContext context, WebTemplateUnit unit)This method is called to initialize the cell in design mode.voidinit(TransformContext context, WebTitle title)This method is called to initialize the cell in view mode.voidinit(WebComponent wc, WebTemplateUnit unit, java.util.HashMap cachedObjects)Deprecated.please use the interface that receivesTransformContextinstance instead.voidinit(WebComponent wc, WebTitle title, java.util.HashMap cachedObjects)Deprecated.please use the interface that receivesTransformContextinstance instead.protected voidinitCell()Initialize the cell title informationprotected voidinitDNDForDesignMode(DragAndDropItem item)This method initializes properties used in javascript for drag and drop in design mode.protected voidinitDNDForExecuteMode(DragAndDropItem item)This method initializes properties used in javascript for drag and drop in view mode.protected booleanisDrillPathAvailable(WebTitle title)Utility method to determine if the current title has drill information availablebooleanisSortAscending()booleanisSorted()protected voidrenderContextMenu(MarkupOutput mo)Deprecated.voidreset()Reset all of the instance variables.-
Methods inherited from class com.microstrategy.web.app.transforms.AbstractReportGridCellTitle
addContextMenuAttributes, canAddShortcutMetric, canDrillAdvanced, canEditControl, canFilterOn, canHaveDerivedElements, canHyperLink, canModifyAttributeForm, canPivot, canRename, canSort, cellNeedsLink, generateContent, generateControlAnchor, generateDrillAnchor, generateElementAnchor, generatePivotButton, generateTooltipContent, getAddShortcutMetricEvent, getCellAttributes, getDerivedElementsEvent, getDrillPathWithHighImportance, getFilterOnEvent, getGridTemplate, getKey, getMaxPosition, getOpenFormatEditorEvent, getPivotEvent, getPosition, getRemoveEvent, getRenameEvent, getSelectorEvent, getSetFormatEditorTargetEvent, getUnitType, getURLBuffer, getWebTemplateUnit, getWebTitle, hasRuntimeUnitLimit, init, init, isFirst, isLast, setWebTemplateUnit, setWebTitle, shouldHiliteOnServer, showRemoveFromReport
-
Methods inherited from class com.microstrategy.web.app.transforms.AbstractReportGridDisplayCell
addContextMenuAttributes, addDragAndDropAttributes, addExtraAttribute, addToHeaderMetricValueJsonMap, addTooltipAttributes, addToStyle, buildGenericTooltipInformation, canDefineDerivedElements, canDrill, canEditMetricFilter, canFilterOnSelection, canFormat, canInsertShortcutMetric, canMetricFilterOn, canOpenAlerts, canPivot, canQuickGroup, canRemoveFromGrid, canRemoveFromReport, canUse, checkOwnerAndPrivilgeForHTMLExecution, clone, convertNonbreakingSpaceOnMV, decodeEuro, encodeMV, generateAnchor, generateContextMenu, generateDragAndDrop, generateDragAndDropAttributes, generateDrillCheckBox, generateDrillCheckBox, generateDrillCheckBox, generateDrillCheckBoxTag, generateDrillContextMenu, generateDrillOpenLink, generateDrillOpenLink, generateFilterOnSelectionCheckBox, generateFilterOnSelectionCheckBox, generateFilterOnSelectionCheckBox, generateFilterOnSelectionCheckBoxTag, generateHeaderDrillContextMenu, generateHeaderDrillContextMenu, generateHeaderSortContextMenu, generateHeaderSortContextMenu, generateInnerHTML, generateOutlineModeImage, generateOutlineSubTotalName, generateOutput, generatePostContent, generatePreContent, generateRowValueDrillContextMenu, generateRowValueDrillContextMenu, generateSortContextMenu, generateText, generateThresholdSymbol, generateTitleDrillContextMenu, generateTitleDrillContextMenu, generateTitleSortContextMenu, generateTitleSortContextMenu, generateTooltip, generateTooltipForHeaders, generateTooltipForRowValue, generateTooltipForTitles, getAccessibilityInfo, getBaseBean, getCellColor, getCellID, getCellLevelAttributes, getCellType, getColHeaderWebMetric, getColSpan, getContext, getContext, getContextMenu, getContextMenu, getContextMenuAttributes, getContextMenuAttributes, getContextMenuManager, getControlElementSelectorEvent, getCssPrefix, getDefaultAdvancedDrillEvent, getDefaultAdvancedDrillProcessEvent, getDefaultDrillEditorProcessEvent, getDefaultDrillEvent, getDefaultDrillEvent, getDefaultDrillFilterOnSelectionEvent, getDefaultSortEvent, getDerivedElementsEvent, getDescription, getDescriptor, getDescriptor, getDrillEvent, getDrillKey, getDrillParametersForDHTML, getDrillPath, getDrillpathKey, getDrillPathKey, getDrillpathKeyInOldFormat, getEventManager, getExtraInfo, getExtraStyle, getExtraUrl, getFilterOnEvent, getFPIntValue, getFPStringValue, getGridCell, getHeaderContent, getHeaderDrillParametersForDHTML, getHeaderDrillParametersForDHTML, getHeaderDrillPathWithHighImportance, getHeaderDrillPathWithHighImportance, getHeaderDrillURL, getHeaderDrillURL, getImgName, getMaxColHeaderDepth, getMaxSortAllowed, getNearestNonMetricRowHeader, getPostTextForMetricValue, getPostTextForNonMetricValue, getPreTextForMetricValue, getPreTextForNonMetricValue, getRenameEvent, getReportBean, getReportDesignMode, getReportGridTransform, getRowSpan, getRowValueDrillElements, getRowValueDrillParametersForDHTML, getRowValueDrillParametersForDHTML, getRowValueDrillPathWithHighImportance, getRowValueDrillPathWithHighImportance, getRowValueDrillURL, getRowValueDrillURL, getRWDDrillOutEvent, getShowDescriptionAsTooltip, getSortAscendingEvent, getSortDescendingEvent, getSortEvent, getSortEventByAxis, getSortEventByAxisBySortOrder, getSortStatus, getStyle, getStyleForNonBuiltInFormat, getSubTitle, getSubtitleIndex, getTargetKeys, getText, getTitleDrillParametersForDHTML, getTitleDrillParametersForDHTML, getTitleDrillURL, getTitleDrillURL, getTooltip, getViewBean, getWidth, groupContextMenuDrillPathsByType, hasDrillPathsWithHighImportanceAvailable, hasMetricFilterCondition, init, init, initDragAndDrop, isAccessibilityMode, isContextMenuEnabled, isContextMenusEnabled, isDerivedMetric, isDesignMode, isDhtml, isDragAndDropEnabled, isFeatureAvailable, isFPTrue, isFPTrue, isHeaderMVJsonMovable, isHeaderNeedLink, isHTMLExecutionAllowed, isIframeEnabled, isIFrameEnabled, isIframeRequest, isIFrameRequest, isItemsAddedToContextMenu, isMetric, isMetricDrillable, isOutlineModeEnabled, isRemoveAvailable, isRowValueNeedLink, isRW, isSortAscending, isTitleNeedLink, newContext, newNamespaceEncoder, renderPivotButtons, setAccessibilityInfo, setArgumentFromFormalParameter, setCellColor, setCellID, setCellType, setColSpan, setContent, setContextMenu, setDescription, setDrillPath, setExtraInfo, setExtraStyle, setExtraStyle, setExtraUrl, setHTML, setInnerHTML, setPostContent, setPreContent, setRowSpan, setStyle, setStyleForNonBuiltInFormat, setSubTitle, setSubTitleIndex, setText, setTooltip, setWidth, showAdvancedDrillingOptionsInContextMenu, showBanding, showDrillAdvanced, showDrillCheckBox, showDrillDownOnly, showDrillHyperlink, showDrillHyperlinkMetric, showDrillMetric, showDrillPathSetNamesSubMenuAtTopLevel, showDrillRMC, showDrillRMCMetric, showExtraRemoveRMC, showFilterOnSelectionCheckBox, showFormattingRMC, showPivot, showPivotRMC, showRemove, showRemoveFromReport, showRemoveRMC, showRenameRMC, showSortButtonsForAttributes, showSortButtonsForMetrics, showSortRMCForAttributes, showSortRMCForMetrics, showSubtitle, showSubTitle, sortSetNamesAndDrillPaths, useBuiltInFormat
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.microstrategy.web.app.transforms.ReportGridCellTitle
canAddShortcutMetric, getAddShortcutMetricEvent, getSubTitle, getSubtitleIndex, getWebTemplateUnit, getWebTitle, setSubTitle, setSubTitleIndex
-
Methods inherited from interface com.microstrategy.web.app.transforms.ReportGridDisplayCell
addExtraAttribute, canDrill, canDrillAdvanced, canEditControl, canEditMetricFilter, canFilterOn, canFilterOnSelection, canFormat, canHaveDerivedElements, canHyperLink, canInsertShortcutMetric, canMetricFilterOn, canModifyAttributeForm, canOpenAlerts, canPivot, canPivot, canQuickGroup, canRemoveFromGrid, canRemoveFromReport, canRename, canSort, generateOutput, getAccessibilityInfo, getCellID, getCellType, getColSpan, getControlElementSelectorEvent, getDerivedElementsEvent, getDrillEvent, getDrillPathWithHighImportance, getExtraInfo, getExtraStyle, getFilterOnEvent, getHeaderContent, getKey, getOpenFormatEditorEvent, getRenameEvent, getRowSpan, getSetFormatEditorTargetEvent, getStyle, getText, getTooltip, getWidth, init, init, init, init, isRW, setAccessibilityInfo, setCellID, setColSpan, setContent, setContextMenu, setExtraInfo, setExtraStyle, setExtraStyle, setHTML, setInnerHTML, setPostContent, setPreContent, setRowSpan, setStyle, setText, setTooltip, setWidth
-
-
-
-
Method Detail
-
reset
public void reset()
Description copied from interface:ReportGridDisplayCellReset all of the instance variables. This method is very important when improve the memory performance: we create only one instance for a particular cell type and reuse it instead of creating a new instance for each concrete grid cell. Therefore, it saves a lot of memory. For implementation of this method, please follow the workflow of how all the instance variables are initialized in the class hierarchy when a new instance is created: superclass instance variables are initialized first, subclass instance variables are initialized second. Note: for the purpose of cell reuse.- Specified by:
resetin interfaceReportGridDisplayCell- Overrides:
resetin classAbstractReportGridCellTitle
-
initCell
protected void initCell()
Description copied from class:AbstractReportGridDisplayCellInitialize the cell title information- Overrides:
initCellin classAbstractReportGridDisplayCell
-
init
public void init(TransformContext context, WebTemplateUnit unit)
Description copied from interface:ReportGridCellTitleThis method is called to initialize the cell in design mode. It receives aWebTemplateUnitinstance as the underlying SDK object- Specified by:
initin interfaceReportGridCellTitle- Overrides:
initin classAbstractReportGridCellTitle- Parameters:
context-TransformContextinstance initialized with the grid's transform information.unit-WebTemplateUnitinstance corresponding to the cell to display.- Since:
- MicroStrategy Web 8.0.1
-
init
@Deprecated public void init(WebComponent wc, WebTemplateUnit unit, java.util.HashMap cachedObjects)
Deprecated.please use the interface that receivesTransformContextinstance instead.Description copied from class:AbstractReportGridCellTitleInitialize with the baseWebComponent, theWebTemplateUnitto be rendered and a HashMap with other relevant information for this instance.- Specified by:
initin interfaceReportGridCellTitle- Overrides:
initin classAbstractReportGridCellTitle- Parameters:
wc-WebComponentinstanceunit-WebTemplateUnitinstance to be rendered by this classcachedObjects- HashMap with other relevant information for the initialization.- Since:
- MicroStrategy Web 7.5.2
-
init
public void init(TransformContext context, WebTitle title)
Description copied from interface:ReportGridCellTitleThis method is called to initialize the cell in view mode. It receives aWebTitleinstance as the underlying SDK object- Specified by:
initin interfaceReportGridCellTitle- Parameters:
context-TransformContextinstance initialized with the grid's transform information.title-WebTitleinstance corresponding to the cell to be displayed.- Since:
- MicroStrategy Web 8.0.1
-
init
@Deprecated public void init(WebComponent wc, WebTitle title, java.util.HashMap cachedObjects)
Deprecated.please use the interface that receivesTransformContextinstance instead.Description copied from interface:ReportGridCellTitleThis method is called to initialize the cell in view mode. It receives aWebTitleas the underlying SDK object.- Specified by:
initin interfaceReportGridCellTitle- Parameters:
wc- The bean being transformed.title- TheWebTitlecorresponding to this cell.cachedObjects- AHashMappopulated by the transform and used to store information shared across multiple cells.- Since:
- MicroStrategy Web 7.5.2
-
generatePivotButtons
protected void generatePivotButtons(MarkupOutput mo)
Calls forAbstractReportGridCellTitle.generatePivotButton(int)for each one of the buttons this instance normally supports- Overrides:
generatePivotButtonsin classAbstractReportGridDisplayCell- Parameters:
mo-MarkupOutputinstance where the HTML generated by this method will be saved.
-
generateSortButton
protected Tag generateSortButton()
Generate the sort button tag information for this object- Overrides:
generateSortButtonin classAbstractReportGridDisplayCell- Returns:
Taginstance initialized if sort is supported.- Since:
- MicroStrategy Web 8.0.1
-
generateSortButton
@Deprecated protected void generateSortButton(MarkupOutput mo)
Deprecated.usegenerateSortButton()instead.Generate the HTML for the sort button- Overrides:
generateSortButtonin classAbstractReportGridDisplayCell- Parameters:
mo- MarkupOutput instnace where the HTML generated will be saved
-
appendContextMenuItems
@Deprecated protected void appendContextMenuItems(ContextMenu rhMenu)
Deprecated.Please use the new approach for generating context menus, seeReportCellRemoveFromGrid,ReportCellMove, etc- Overrides:
appendContextMenuItemsin classAbstractReportGridDisplayCell- Since:
- MicroStrategy Web 8.0.0
- See Also:
AbstractAppTransform.contextMenus
-
renderContextMenu
@Deprecated protected void renderContextMenu(MarkupOutput mo)
Deprecated.Description copied from class:AbstractReportGridDisplayCellRender the context menu's trigger for this cell.- Overrides:
renderContextMenuin classAbstractReportGridDisplayCell- Parameters:
mo- the output object- Since:
- MicroStrategy Web 8.0.0
-
initDNDForDesignMode
protected void initDNDForDesignMode(DragAndDropItem item)
Description copied from class:AbstractReportGridDisplayCellThis method initializes properties used in javascript for drag and drop in design mode.- Overrides:
initDNDForDesignModein classAbstractReportGridDisplayCell- Parameters:
item- DragAndDropItem
-
initDNDForExecuteMode
protected void initDNDForExecuteMode(DragAndDropItem item)
Description copied from class:AbstractReportGridDisplayCellThis method initializes properties used in javascript for drag and drop in view mode.- Overrides:
initDNDForExecuteModein classAbstractReportGridDisplayCell- Parameters:
item- DragAndDropItem
-
isDrillPathAvailable
protected boolean isDrillPathAvailable(WebTitle title)
Utility method to determine if the current title has drill information available- Specified by:
isDrillPathAvailablein classAbstractReportGridCellTitle- Parameters:
title-WebTitleinstance to analyze- Returns:
- boolean value indicating if there is drill path information available or not, for the specified title.
-
getGridData
protected WebGridData getGridData() throws WebBeanException, WebObjectsException
- Throws:
WebBeanExceptionWebObjectsException- Since:
- MicroStrategy Web 8.0.0
-
getSortID
protected java.lang.String getSortID()
Description copied from class:AbstractReportGridDisplayCellThis method return the ID to use for sorting this cell.- Specified by:
getSortIDin classAbstractReportGridDisplayCell- Returns:
- The ID to use for sorting this cell.
- Since:
- MicroStrategy Web 8.0.0
-
isSorted
public boolean isSorted()
- Specified by:
isSortedin interfaceReportGridCellRowTitle- Returns:
- boolean value indicating if the current cell is sorted or not
- Since:
- MicroStrategy Web 8.0.1
-
isSortAscending
public boolean isSortAscending()
- Specified by:
isSortAscendingin interfaceReportGridCellRowTitle- Returns:
- boolean value indicating if the current cell is sorted ascending or not
- Since:
- MicroStrategy Web 8.0.1
-
getSortEvent
public WebEvent getSortEvent(int type)
Description copied from interface:ReportGridCellRowTitleGet theWebEventinstance with the information for sorting the current cell values- Specified by:
getSortEventin interfaceReportGridCellRowTitle- Parameters:
type- int value with the identifier for the sort order to generate. Values expected includeReportGridCellRowTitle.SORT_TYPE_ASCENDINGandReportGridCellRowTitle.SORT_TYPE_DESCENDING- Returns:
- WebEvent
- Since:
- MicroStrategy Web 8.0.1
-
hasWebObject
protected boolean hasWebObject()
Description copied from class:AbstractReportGridDisplayCellThis method allows the abstract class to identify whether the cell has been initialized with a valid WebObject. Some cells are created empty (with no underlying web object), they usually represent empty cells (like the ones used in design mode for metric values or row headers); in these cases some functionality needs to be disabled (liek context-menus or dnd), this method allow us to identify these cells.- Specified by:
hasWebObjectin classAbstractReportGridDisplayCell- Returns:
- true if the cell has underlying
WebObject. - Since:
- MicroStrategy Web 8.0.0
-
canAddThresholds
public boolean canAddThresholds()
Description copied from class:AbstractReportGridDisplayCellUtility methood for determining if the cell object is enabled for displaying the user the option to add threshold to it- Specified by:
canAddThresholdsin interfaceReportGridDisplayCell- Overrides:
canAddThresholdsin classAbstractReportGridDisplayCell- Returns:
- boolean value indicating if the manipulation should be enabled
-
-