UIComponent class: oracle.adf.view.faces.bi.component.pivotTable.UIPivotTable
Component type: oracle.dss.adf.pivotTable.PivotTable
The Pivot Table supports the display of multiple nested attributes on a row and column header. In addition, the Pivot Table supports the ability to dynamically change the layout of the attributes displayed in the row or column headers via drag and drop pivoting.
The Pivot Table component uses a model to display and interact with data. The specific model class to use is oracle.adf.view.faces.bi.model.pivotTable.PivotTableModel
. When linking a Pivot Table and a Graph to the same data is required, the Pivot Table model can be an instance of oracle.adf.view.faces.bi.model.DataModel
.
The inlineStyle attribute can be used to specify a Pivot Table's width and height. For example, inlineStyle="width:600px;height:400px" or inlineStyle="width:100%;height:400px".
Pivot Table supports auto-sizing, which can be used by setting pivot table's attribute sizing="auto"
. When auto-sizing is set, the height of the pivot table is determined by the size of the content that is being displayed by the pivot table. If the content is smaller than the default size of the pivot table, then the pivot table will shrink. If the content is larger than the default size of the pivot table, the content will grow and pivot table will display scrollbars as needed.
Please note that when sizing="auto", the pivot table's frame will initially be displayed with the default size of the pivot table ( using the width/height CSS attributes ) and then the pivot table's frame will readjust to fit its contents. This can cause the layout of the page displaying the pivot table to change after the page is initially displayed.
In order to customize header cell content, set HeaderFormat attributes. For customizing data cell content, use DataFormat. HeaderFormat/DataFormat attributes return instances of oracle.dss.adf.view.faces.bi.component.pivotTable.CellFormat
. CellFormat instances allow specification of the following:
javax.faces.convert.Converter
, which is used to perform number/date/text formatting of a cell raw valueFor more detailed description, refer to <dvt:dataCell>
component guide
Selection allows a user to select one or more cells. Pivot table has three different types of selection, i.e. row header selection set, column header selection set, and data selection set. Only one type of selection can be made in pivot table at any one time. An application can implement some features, for example, display a customized content for a context menu, based on the current selected cells.
The code example below shows how to get the currently selected header cells.
UIPivotTable pt = getPivotTable();
if (pt == null)
return null;
HeaderCellSelectionSet headerCells = null;
if (pt.getSelection().getColumnHeaderCells().size() > 0) {
headerCells = pt.getSelection().getColumnHeaderCells();
} else if (pt.getSelection().getRowHeaderCells().size() > 0) {
headerCells = pt.getSelection().getRowHeaderCells();
}
Drill operation is used to hide or unhide hierarchy of the data within pivot table. It is supported when the underlying data source allows this operation. A drill listener will be notified after a drill event is successfully performed. drillEnabled
attribute specifies whether drilling is enabled.
Pivot operation can be peformed for each data attribute, and it will change the data presentation structure within pivot table. It is supported when the underlying data source allows this operation. A pivot listener will be notified after a pivot event is successfully performed. This operation can be enabled using pivotEnabled
property of pivot table.
Sort operation is used to sort the data within pivot table. It is supported when the underlying data source allows this operation. A sort listener will be notified after a sort event is successfully performed. sortMode
attribute specifies if sort operation is enabled, and which type of sort should be used.
Pivot Table provides status bar that will be shown when pivot table's attribute statusBarRendered="true"
. It provides selection information, i.e. current selection type and number of cells/rows/columns selected.
This component can be the parent of:
<dvt:dataCell>
is used to specify read-only as well as input component type for each data attributeThe following shows an example of using Pivot Table component
<dvt:pivotTable
value="#{pivotTableEditBean.dataModel}" />
The following shows an example of specifying listeners for various pivot table operations
<dvt:pivotTable id="goodPT"
value="#{richPivotTableModel.dataModel}"
pivotListener="#{richPivotTableBean.handlePivotEvent}"
drillRequestedListener="#{richPivotTableBean.handleDrillRequestedEvent}"
sortListener="#{richPivotTableBean.handleSortEvent}"
/>
Type | Phases | Description |
---|---|---|
oracle.adf.view.faces.bi.event.DrillEvent | Invoke Application |
An event which indicates that a drill operation is executed. A DrillEvent is enabled by adding the DrillListener to the graph. |
oracle.adf.view.faces.bi.event.pivotTable.SortEvent | Invoke Application | The sort event is delivered when the pivot table is sorted. |
oracle.adf.view.faces.bi.event.PivotEvent | Invoke Application | The pivot event is delivered when a pivot operation is performed in the pivot table. |
oracle.adf.view.faces.bi.event.pivotTable.CellImageClickEvent | Invoke Application | Deprecated. The click event is delivered when a cell image is clicked. |
org.apache.myfaces.trinidad.event.AttributeChangeEvent | Invoke Application, Apply Request Values |
Event delivered to describe an attribute change. Attribute change events are not delivered for any programmatic change to a property. They are only delivered when a renderer changes a property without the application's specific request. An example of an attribute change events might include the width of a column that supported client-side resizing. |
Name | Type | Supports EL? | Description |
---|---|---|---|
attributeChangeListener | javax.el.MethodExpression | Only EL | a method reference to an attribute change listener. Attribute change events are not delivered for any programmatic change to a property. They are only delivered when a renderer changes a property without the application's specific request. An example of an attribute change events might include the width of a column that supported client-side resizing. |
autoIndent | int | Yes | Specifies how many pixels to indent row labels for each level in a hierarchy. This property specifies the number of pixels to indent each level. The default value is 5. |
binding | String | Only EL | binding reference to store the UIPivotTable component |
bodyContextMenuId | String | Yes | A search expression to identify the popup component containing the context menu that will be shown within the pivot table body, for clicks outside the selectable regions of the pivot table, such as the row header, column header, or data regions. Expressions are relative to this pivot table component and must account for NamingContainers. You can prepend a single colon to start the search from the root, or multiple colons to move up through the NamingContainers. For example, a leading "::" will search from the parent NamingContainer, ":::" will search from the grandparent NamingContainer, etc. |
cellImageClickAction | String | Yes | Deprecated. It will be removed in the next release. Custom images should be specified via 'dvt:dataCell' with child tag 'af:image', 'af:icon' or 'af:commandImageLink' instead. A method reference to a cell image click action |
cellImageClickListener | String | Yes | Deprecated. It will be removed in the next release. Custom images should be specified via 'dvt:dataCell' with child tag 'af:image', 'af:icon' or 'af:commandImageLink' instead. A method reference to a cell image click listener that will be called after an image click operation is performed in pivot table |
columnFetchSize | int | Yes | The number of columns in a data fetch block. The default value is 10. |
contentDelivery | String | Yes | Either "lazy" or "immediate". If "lazy", then pivot table's content is fetched after the pivot table is sent to the browser. If "immediate", then the pivot table content is immediately sent to the browser. The default value is "lazy". |
contextMenuId | String | Yes | A search expression to identify the popup component containing the context menu that will be shown for clicks within selectable regions of the pivot table, such as the row header, column header, or data regions. Expressions are relative to this pivot table component and must account for NamingContainers. You can prepend a single colon to start the search from the root, or multiple colons to move up through the NamingContainers. For example, a leading "::" will search from the parent NamingContainer, ":::" will search from the grandparent NamingContainer, etc. |
customizationId | String | Yes | This attribute is deprecated. The 'id' attribute should be used when applying persistent customizations. This attribute will be removed in the next release. |
dataFormat | String | Yes | A MethodExpression that returns a oracle.adf.view.faces.bi.component.pivotTable.CellFormat given a oracle.adf.view.faces.bi.component.pivotTable.DataCellContext |
dataFormatManager | String | Yes | An instance of oracle.adf.view.faces.bi.component.pivotTable.DataFormatManager. It gives an application the ability to serialize their format rules for a specific pivot table across requests. |
dontPersist | String | Yes | List of persistent attributes that are restricted from persisting to a registered "Persistent Change Manager". Persistent attributes would still persist to a session. |
drillAction | String | Yes | A reference to an action method sent by the component, or the static outcome of a drill action |
drillRequestedListener | String | Yes | A method reference to a drill requested listener that will be called after a drill operation is performed in pivot table |
drillRequestingListener | String | Yes | a method reference to a drill requesting listener |
drillingEnabled | boolean | Yes | Specifies whether drilling is enabled. The default value is true. |
emptyText | String | Yes | The text of an empty pivot table. If the text is enclosed in an html tag, it will be formatted. The formatting behavior is similar to outputFormatted component. |
headerFormat | String | Yes | A MethodExpression that returns a oracle.adf.view.faces.bi.component.pivotTable.CellFormat given a oracle.adf.view.faces.bi.component.pivotTable.HeaderCellContext |
headerFormatManager | String | Yes | An instance of oracle.adf.view.faces.bi.component.pivotTable.HeaderFormatManager. It gives an application the ability to serialize their format rules for a specific pivot table across requests. |
id | String | No | the identifier for the component. The identifier must follow a subset of the syntax allowed in HTML:
|
indentEnabled | boolean | Yes | Specifies whether row labels for different levels of a hierarchical layer are indented. The default value is true. |
inlineStyle | String | Yes | The inline style of the pivot table's outer DOM element. Can be used to control the size/position of the pivot table. |
partialTriggers | String | Yes | The IDs of the components that should trigger a partial update for pivot table. This component will listen on the trigger components. If one of the trigger components receives an event that will cause it to update in some way, this component will request to be updated too. |
persist | String | Yes | List of persistent attributes that are persisting to a registered "Persistent Change Manager". Persistent attributes, by default, always persist to a session. |
pivotEnabled | boolean | Yes | Specifies whether pivoting is enabled. The default value is true. |
pivotLabelVisible | boolean | Yes | Specifies whether layer/dimension labels are visible on pivot handles. The default value is true. |
pivotListener | String | Yes | A method reference to a pivot listener that will be called after a pivot operation is performed in pivot table |
rendered | boolean | Yes | Specifies whether the component is rendered. The default value is true. |
rowFetchSize | int | Yes | The number of rows in a data fetch block. The default value is 25. |
selection | String | Yes | An instance of oracle.adf.view.faces.bi.component.pivotTable.Selection that keeps track of selected cells in pivot table |
sizing | String | Yes | Valid Values: fixed, auto. Specifies how pivot table's size ( width/height ) is determined. When sizing="fixed", the pivot table is sized based in the width / height CSS properties in its default style or inline style property. When sizing="auto", the height of the pivot table is determined by the size of the content that is being displayed by the pivot table. If the content is smaller than the default size of the pivot table, then the pivot table will shrink. If the content is larger than the default size of the pivot table, the content will grow. To control maximum height / width of the pivot table, the max-height / max-width CSS properties can be specified using pixels in the inlineStyle property of the pivot table, as follows "max-width:400px;max-height:300px". Once the maximum height or width is exceeded, then pivot table will display scrollbars as needed. Please note that when sizing="auto", the pivot table's frame will initially be displayed with the default size of the pivot table ( using the width/height CSS attributes ) and then the pivot table's frame will readjust to fit its contents. This can cause the layout of the page displaying the pivot table to change after the page is initially displayed. The default value is "fixed". |
sizingManager | String | Yes | An instance of oracle.adf.view.faces.bi.component.pivotTable.SizingManager |
sortListener | String | Yes | A method reference to a sort listener that will be called after a sort operation is performed in pivot table |
sortMode | String | Yes | Specifies the sort mode. Options are "grouped", "ungrouped", and "none". The default value is "grouped". |
startColumn | int | Yes | The first visible column of data. The default value is 0. |
startRow | int | Yes | The first visible row of data. The default value is 0. |
statusBarRendered | boolean | Yes | Specifies whether the status bar is rendered. The default value is false |
styleClass | String | Yes | Sets a CSS style class to use for this component. |
summary | String | Yes | Sets a summary of this pivot table's purpose and structure for user agents rendering to non-visual media (e.g. screen readers). |
value | String | Yes | the data model for the pivot table - can be an instance of oracle.adf.view.faces.bi.model.pivotTable.PivotTableModel or oracle.adf.view.faces.bi.model.DataModel |
var | String | Yes | Name of the EL variable used to reference cell data within pivot table DataCell stamps. Once this component has completed rendering, this variable is removed (or reverted back to its previous value). |
varStatus | String | Yes | Name of the EL variable used to reference the varStatus information. Once this component has completed rendering, this variable is removed (or reverted back to its previous value). The VarStatus provides contextual information about the state of the component to EL expressions. The common properties on varStatus include: "model" - returns the DataModel for this component "cellIndex" - returns the cell index "cellKey" - returns the cell key "current" - returns the current cell data |
visible | boolean | Yes | the visibility of the component. If it is "false", the component will be hidden on the client. Unlike "rendered", this does not affect the lifecycle on the server - the component may have its bindings executed, etc. - and the visibility of the component can be toggled on and off on the client, or toggled with PPR. When "rendered" is false, the component will not in any way be rendered, and cannot be made visible on the client. The default value is true. |