java.lang.Object | |||
↳ | com.microstrategy.web.app.transforms.AbstractReportGridDisplayCell | ||
↳ | com.microstrategy.web.app.transforms.AbstractReportGridCellHeader | ||
↳ | com.microstrategy.web.app.transforms.ReportGridCellRowHeaderImpl |
![]() |
The ReportGridCellRowHeaderImpl
is used to generate the HTML
of a cell of that is a value of the row axis.
SDK
objects:
WebHeader
: used in view mode, this is the SDK object that represents a value
of the row axis.
WebTemplateMetric
: used in design mode when the metrics
are located in the column axis, each metric is represented as a row header.
The ReportGridCellRowHeaderImpl
extends the AbstractReportGridDisplayCell
which controls the exeuction flow.
Users who intend to programatically modify the HTML generated for a row header should
extend this class. Using this technique developers could define their own rules of the text to
display based on the WebHeader
content.
generateText(MarkupOutput)
method
of this class based on the header's semantics:
public class CustomColHeader extends ReportGridCellRowHeaderImpl { public void generateText(MarkupOutput mo) { WebHeader header = getWebHeader(); if (header != null) { switch (header.getSemantics()) { case EnumDSSXMLBaseFormType.DssXmlBaseFormPicture: mo.append("<IMG SRC=\""); mo.append(getText()); mo.append("\" ALT=\"\" BORDER=0 />"); break; case EnumDSSXMLBaseFormType.DssXmlBaseFormUrl: case EnumDSSXMLBaseFormType.DssXmlBaseFormEmail: mo.append("<A HREF=\""); if (header.getSemantics() == EnumDSSXMLBaseFormType.DssXmlBaseFormEmail) mo.append("mailto:"); mo.append(getText()); mo.append("\">"); mo.append(getText()); mo.append("</A>"); break; case EnumDSSXMLBaseFormType.DssXmlBaseFormHTMLTag: mo.append(HTMLHelper.decode(getText())); break; default: super.generateText(mo); break; } } else { super.generateText(mo); } } }
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ReportGridCellRowHeaderImpl()
Constructor used for creating a generic display cell.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
boolean |
canInsertShortcutMetric()
Utility methood for determining if the cell object is enabled for displaying the user
the option to insert shortcut metrics based on it
| ||||||||||
boolean |
canMetricFilterOn()
Utility method for determining if the cell object is enabled for displaying the user
the option to apply a metric filter on it
| ||||||||||
boolean |
canPivot()
Utility methood for determining if the cell object is enabled for displaying the user
the option to pivot it
| ||||||||||
boolean |
canRemoveFromGrid()
Utility methood for determining if the cell object is enabled for displaying the user
the option to remove it from the grid.
| ||||||||||
boolean |
canRemoveFromReport()
Utility methood for determining if the cell object is enabled for displaying the user
the option to remove it from the report
| ||||||||||
boolean |
canSort()
Utility methood for determining if the cell object is enabled for displaying the user
the option to sort it
| ||||||||||
String |
getExtraStyle()
Returns the extra style information required for the formatting of the cell
as registered by the Transform.
| ||||||||||
void |
init(TransformContext context)
Initializes the instance.
| ||||||||||
void |
init(WebComponent wc, WebTemplateUnit unit, FormalParameters formalParas)
This method is deprecated.
please use the interface that receives
TransformContext instance instead. | ||||||||||
void |
init(WebComponent wc, WebTemplateMetric metric, FormalParameters formalParas)
This method is deprecated.
please use the interface that receives
TransformContext instance instead. | ||||||||||
void |
init(TransformContext context, WebHeader header)
This method is called to initialize the cell in view mode.
| ||||||||||
void |
init(WebComponent wc, HashMap cachedObjects)
This method is deprecated.
use the init interface that receives a
ReportGridTransformImpl.Context object | ||||||||||
void |
init(WebComponent wc, WebHeader header, HashMap cachedObjects)
This method is deprecated.
please use the interface that receives
TransformContext instance instead. | ||||||||||
void |
init(WebComponent wc, WebTemplateMetric metric, HashMap cachedObjects)
This method is deprecated.
please use the interface that receives
TransformContext instance instead. | ||||||||||
void |
init(FormalParameters formalParas)
This method is deprecated.
This method is not used by the Transform anymore. To initialize empty cells
it now uses
init(TransformContext) .
| ||||||||||
void |
init(TransformContext context, WebTemplateMetric metric)
This method is called to initialize the cell in design mode.
| ||||||||||
void |
init(WebComponent wc, FormalParameters formalParas)
This method is deprecated.
This method is not used by the Transform anymore. To initialize empty cells
it now uses
init(TransformContext) . | ||||||||||
boolean |
isMetric()
determine if the row header is containing a metric
| ||||||||||
boolean |
isMetricDrillable(WebHeader header, WebDrillPath drillPath)
return whether the header has a drillable metric
| ||||||||||
void |
reset()
Reset all of the instance variables.
| ||||||||||
void |
setOutlinemodeRowCount(int OutlinemodeRowCount)
In outline mode, this is used to indicate the cell in which row it is being rendered.
| ||||||||||
void |
setOutlinemodeSubTotalName(String OutlineodeSubtotalName)
In outline mode, this is used to indicate the name of the subtotal whose values are being displayed in this row. | ||||||||||
void |
setOutlinemodeWrapHeaderText(boolean isWrap)
Indicates the header text of the outline mode cell need to be wrap up with related html tags.
| ||||||||||
void |
setShowOutlinemodeImage(boolean value)
Indicates the cell that this header can be expanded in outline mode and that
an image to expand/collapse the header needs to be rendered.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
appendContextMenuItems(ContextMenu rhMenu)
This method is deprecated.
Please use the new approach for generating context menus, see
ReportCellRemoveFromGrid , ReportCellMove , etc | ||||||||||
void |
generateDrillCheckBox(MarkupOutput mo)
Obtains the check box tag information for Drill and
renders it out.
| ||||||||||
void |
generateFilterOnSelectionCheckBox(MarkupOutput mo)
Obtains the check box tag information for Filter On Selection and
renders it out.
| ||||||||||
void |
generateOutlineModeImage(MarkupOutput mo)
Generate the javascript images for collapse and expand for outline mode.
| ||||||||||
void |
generateOutlineSubTotalName(MarkupOutput mo)
Generate the name of the subtotal type next to the header element for outline mode.
| ||||||||||
Tag | generatePivotButton(int type) | ||||||||||
void |
generatePreContent(MarkupOutput mo)
Generates the preContent of the cell. | ||||||||||
WebGridData | getGridData() | ||||||||||
WebTemplate | getGridTemplate() | ||||||||||
int |
getOutlinemodeRowCount()
get row count for outline mode
| ||||||||||
String |
getOutlinemodeSubTotalName()
get subtotal name for outline mode
| ||||||||||
boolean |
getShowOutlinemodeImage()
get whether display outline mode image
| ||||||||||
String |
getSortID()
This method return the ID to use for sorting this cell.
| ||||||||||
WebTemplateUnit |
getWebTemplateUnit()
Returns the
WebTemplateUnit associated with the class. | ||||||||||
boolean |
hasWebObject()
This method allows the abstract class to identify whether the cell
has been initialized with a valid WebObject.
| ||||||||||
void |
initCell()
Initialize the cell title information
| ||||||||||
void |
initDNDForDesignMode(DragAndDropItem item)
This method initializes properties used in javascript for drag and drop
in design mode.
| ||||||||||
void |
initDNDForExecuteMode(DragAndDropItem item)
This method initializes properties used in javascript for drag and drop in view mode.
| ||||||||||
boolean | isDrillAvailable() | ||||||||||
boolean |
isDrillPathAvailable(WebHeader header)
Utility method to determine if the current header has drill information available
| ||||||||||
void |
renderContextMenu(MarkupOutput mo)
This method is deprecated.
use
getContextMenuAttributes() instead |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Constructor used for creating a generic display cell. For example, the cssPrefix is needed for the empty cells in design mode.
Utility methood for determining if the cell object is enabled for displaying the user the option to insert shortcut metrics based on it
Utility method for determining if the cell object is enabled for displaying the user the option to apply a metric filter on it
Utility methood for determining if the cell object is enabled for displaying the user the option to pivot it
Utility methood for determining if the cell object is enabled for displaying the user the option to remove it from the grid.
Utility methood for determining if the cell object is enabled for displaying the user the option to remove it from the report
Utility methood for determining if the cell object is enabled for displaying the user the option to sort it
Returns the extra style information required for the formatting of the cell
as registered by the Transform.
This text is assigned to the STYLE
attribute of the TD
tag.
Initializes the instance.
context | TransformContext instance that contains a reference to the
transform being used to render the overall grid information |
---|
This method is deprecated.
please use the interface that receives TransformContext
instance instead.
This method is called to initialize the cell in design mode. It receives a
WebTemplateUnit
as the underlying SDK object.
wc | The bean being transformed. |
---|---|
unit | The WebTemplateUnit corresponding to this cell. |
formalParas | all the formal parameters from the report transform. Used to control some output generation. |
This method is deprecated.
please use the interface that receives TransformContext
instance instead.
This method is called to initialize the cell in design mode. It receives a
WebTemplateMetric
as the underlying SDK object.
wc | The bean being transformed. |
---|---|
metric | The WebTemplateMetric corresponding to this cell. |
formalParas | all the formal parameters from the report transform. Used to control some output generation. |
This method is called to initialize the cell in view mode. It receives a
WebHeader
instance as the underlying SDK object
context | TransformContext instance initialized with the grid's
transform information. |
---|---|
header | WebHeader instance coresponding to the cell to be displayed.
|
This method is deprecated.
use the init interface that receives a ReportGridTransformImpl.Context
object
Initializes an ReportGridDisplayCell
. This is used to initialize
empty cells that have no underlying WebObject
.
wc | associated web component. |
---|---|
cachedObjects | a HashMap populated by the transform and
used to store information shared across multiple cells. |
This method is deprecated.
please use the interface that receives TransformContext
instance instead.
This method is called to initialize the cell in view mode. It receives a
WebHeader
as the underlying SDK object.
wc | The bean being transformed. |
---|---|
header | The WebHeader corresponding to this cell. |
cachedObjects | A HashMap populated by the transform and
used to store information shared across multiple cells. |
This method is deprecated.
please use the interface that receives TransformContext
instance instead.
Initialize this class with the cell information to consider for HTML generation
wc | WebComponent base instance |
---|---|
metric | WebTemplateMetric instance related with the cell to be
rendered |
cachedObjects | HashMap instance with information relevant to this instance for HTML generation. |
This method is deprecated.
This method is not used by the Transform anymore. To initialize empty cells
it now uses init(TransformContext)
.
Initializes an ReportGridDisplayCell
. This is used to initialize
empty cells that have no underlying WebObject
.
formalParas | all the formal parameters from the report transform. Used to control some output generation. |
---|
This method is called to initialize the cell in design mode. It receives
a WebTemplateMetric
as the underlying SDK object.
context | TransformContext instance initialized with the grid's
transform information. |
---|---|
metric | WebTemplateMetric instance corresponding to the cell
to be displayed.
|
This method is deprecated.
This method is not used by the Transform anymore. To initialize empty cells
it now uses init(TransformContext)
.
Initializes an ReportGridDisplayCell
. This is used to initialize
empty cells that have no underlying WebObject
.
wc | associated web component |
---|---|
formalParas | all the formal parameters from the report transform. Used to control some output generation. |
determine if the row header is containing a metric
return whether the header has a drillable metric
header | the header object |
---|---|
drillPath | the drill path |
Reset 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.
In outline mode, this is used to indicate the cell in which row it is being rendered.
This information needs to be added to the cell's tag
to enable
expanding/collapsing of its child rows.
OutlinemodeRowCount | The row number this cell is being rendered in. |
---|
In outline mode, this is used to indicate the name of the subtotal whose values are being displayed in this row.
In outline mode, the Transform automatically shows the values of the first subtotal for the current level. This enables users to analize the data even if the level is collapsed. The cell should display the name of this subtotal.
OutlineodeSubtotalName | String with the subtotal's name. |
---|
Indicates the header text of the outline mode cell need to be wrap up with related html tags.
isWrap | If set to true , the header text need to do format converting. |
---|
Indicates the cell that this header can be expanded in outline mode and that an image to expand/collapse the header needs to be rendered.
value | If set to true , the cell needs to include the image
to expand/collapse the cell
|
---|
This method is deprecated.
Please use the new approach for generating context menus, see
ReportCellRemoveFromGrid
, ReportCellMove
, etc
Obtains the check box tag information for Drill and renders it out.
mo | MarkupOutput instance where the HTML content generated by this method
will be saved
|
---|
Obtains the check box tag information for Filter On Selection and renders it out.
mo | MarkupOutput instance where the HTML content generated by this method
will be saved
|
---|
Generate the javascript images for collapse and expand for outline mode.
mo | the output object |
---|
Generate the name of the subtotal type next to the header element for outline mode.
mo | the output object |
---|
Generates the preContent of the cell. The pre-Content means the html content before the
core content of the cell. An example would be a checkbox before the text.
By default, this method generates images for grids in outline mode, drilling checkboxes
and filter on selection checkboxes.
Developers can either use the setPreContent(String)
method to set any text they want
to display before the contents of the cell or override this method
to inherit its functionality and build on top of it.
AbstractReportGridDisplayCell
:public void generatePreContent(MarkupOutput mo) { super.generatePreContent(mo); mo.append("<LI>"); }
mo | the output object |
---|
get row count for outline mode
get subtotal name for outline mode
get whether display outline mode image
This method return the ID to use for sorting this cell.
Returns the WebTemplateUnit
associated with the class.
This 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.
WebObject
.Initialize the cell title information
This method initializes properties used in javascript for drag and drop in design mode.
item | DragAndDropItem |
---|
This method initializes properties used in javascript for drag and drop in view mode.
item | DragAndDropItem |
---|
Utility method to determine if the current header has drill information available
header | WebHeader instance to analyze |
---|
This method is deprecated.
use getContextMenuAttributes()
instead
Render the context menu's trigger for this cell.
mo | the output object |
---|