Sorting in a Pivot Table

26-10 Web User Interface Developers Guide for Oracle Application Development Framework – column: An integer that specifies the zero-based column that contains the data cell that you want to format. – qdr: The QDR that is a fully qualified reference for the data cell that you want to format. – value: A java.lang.Object that contains the value in the data cell that you want to format. 2. Pass the DataCellContext to a method expression for the dataFormat attribute of the pivot table. 3. In the method expression, write code that specifies the kind of formatting you want to apply to the data cells of the pivot table. This method expression must return a CellFormat object.

26.9.2 How to Construct a CellFormat Object

An instance of a CellFormat object lets you specify the following arguments: ■ Converter: An instance of javax.faces.convert.Converter, which is used to perform number, date, or text formatting of a raw value in a cell. ■ CSS style: Used to change the CSS style of a cell. For example, you might use this argument to change the background color of a cell. ■ CSS text style: Used to change the CSS style of the text in a cell. For example, you might use this argument to set text to bold. ■ New raw value: Used to change the cell’s underlying value that was returned from the data model. For example, you might choose to change the abbreviated names of states to longer names. In this case, the abbreviation NY might be changed to New York.

26.9.3 How to Change Format and Text Styles

You can apply formatting and text styles to emphasize aspects of the data displayed in the pivot table. Figure 26–13 shows a pivot table with sales totals generated for products and for product categories. In the rows that contain totals, this pivot table displays bold text a text style change against a shaded background a style change. These changes show in both the row header cells and the data cells for the pivot table. The row headers for totals contain the text Sales Total. The pivot table also shows stoplight and conditional formatting of data cells. For more information, see Section 26.9.4, How to Create Stoplight and Conditional Formatting in a Pivot Table.