How to Change Format and Text Styles

26-14 Web User Interface Developers Guide for Oracle Application Development Framework Figure 26–14 Pivot Table Using Data Cell Stamping

26.10.1 How to Specify Custom Images for Data Cells

With data cell stamping you can use the dvt:dataCell tag to specify a custom image for a data cell using af:image, af:icon, or af:commandImageLink as a child tag. Example 26–8 shows sample code for using an af:commandImageLink as a custom image in a pivot table data cell. Example 26–8 Using a Custom Image for a Data Cell dvt:pivotTable var=cellData varStatus=cellStatus -- This is the default data cell that will be used for all data attributes-- dvt:dataCell af:commandImageLink text=Go icon=imagesgo.gif actionListener={pivotTableBean.imageLinkClick} af:outputText value={cellData.dataValue} dvt:dataCell dvt:pivotTable Actions associated with the image are handled through a registered listener, actionListener. In a bean class you specify the method to be called when the image link is clicked, for example: public void imageLinkClick javax.faces.event.ActionEvent.action

26.10.2 How to Specify Images, Icons, Links, and Read-Only Content in Header Cells

In the same way that you use stamping in data cells, you can customize the content in header cells using the dvt:headerCell child component to place a read-only component in each header cell. Only read-only components or noneditable components are supported, including af:outputText, af:image, af:icon, af:commandImageLink, and af:commandLink. Example 26–9 shows sample code for using an af:commandImageLink as a custom image and af:icon as a custom icon in pivot table header cells. Example 26–9 Using Custom Components in Header Cells dvt:pivotTable id=goodPT binding={pivotTableHeaderCellDemo.pivotTable} contentDelivery=immediate value={pivotTableHeaderCellDemo.dataModel} var=cellData varStatus=cellStatus -- header cell components -- Note: In order to temporarily or permanently write values back to a set of cells within a cube, called a writeback, the pivot table must be bound to a data control or data model that supports writeback operations. A row set based data control is transformed into a cube and therefore cannot support writeback operations. Using ADF Pivot Table Components 26-15 dvt:headerCell af:switcher defaultFacet=default facetName={cellData.layerName} f:facet name=Geography af:outputText value={cellData.label} shortDesc={cellData.label} af:icon name=info shortDesc={cellData.indent} f:facet f:facet name=Channel af:outputText value={cellData.label} af:commandImageLink shortDesc=Sample commandImageLink icon=resourcesimagespivotTableCSVDemosmily-normal.gif hoverIcon=resourcesimagespivotTableCSVDemosmily-glasses.gif af:commandButton text=Go to Tag Guide page immediate=true action=guide f:facet f:facet name=Product af:outputText value={cellData.label} af:commandButton text=Go to Tag Guide page immediate=true action=guide f:facet f:facet name =default af:commandLink text={cellData.label} immediate=true action=guide f:facet af:switcher dvt:headerCell ... dvt:pivotTable Figure 26–15 shows the resulting pivot table. Figure 26–15 Pivot Table with Customized Header Cells

26.11 Using a Pivot Filter Bar with a Pivot Table

You can enhance the data filtering capacity in a pivot table by adding a pivot filter bar. Zero or more layers of data not already displayed in the pivot table row edge or column edge are displayed in the page edge. Figure 26–16 shows a pivot filter bar with Quarter and Month layers that can be used to filter the data displayed in the pivot table. 26-16 Web User Interface Developers Guide for Oracle Application Development Framework Figure 26–16 Pivot Filter Bar with Data Layer Filters You can also change the display of data in the pivot table by pivoting layers between the row, column, or page edges. Use the pivot handle to drag the layers between the edges as desired. Figure 26–17 shows the modified pivot table and pivot filter bar when the Channel data layer is pivoted to the page edge. Figure 26–17 Pivot Table and Pivot Filter Bar After Pivot

26.11.1 How to Associate a Pivot Filter Bar with a Pivot Table

You associate a pivot filter bar component, dvt:pivotFilterBar, to work with a pivot table component, dvt:pivotTable, by configuring the data model and associated properties to work with both components. Example 26–10 shows sample code for associating a pivot filter bar with a pivot table. Example 26–10 Sample Code for Pivot Filter Bar dvt:pivotFilterBar id=pf1 value={binding.pt.pivotFilterBarModel} modelName=pt1Model dvt:pivotTable id=pt1 value={binding.pt.dataModel} modelName=pt1Model partialTriggers=pf1 You can associate a pivot filter bar with a pivot table in any of the following ways: ■ Create a pivot table using the Data Controls Panel. When you drag a data collection from the Data Controls Panel to create a pivot table on your page, the Select Display Attributes page of the Create Pivot Table wizard provides the option to create a pivot filter bar to associate with the pivot table. You can choose to specify zero or more attributes representing data layers in the page edge. The data model and associated properties are automatically configured for you. For detailed information, see the Creating Databound ADF Pivot Tables section in the Oracle Fusion Middleware Fusion Developers Guide for Oracle Application Development Framework. ■ Add a pivot filter bar to a pivot table bound to data.