Oracle Fusion Middleware Data Visualization Tools Tag Reference for Oracle ADF Faces
12c (12.1.2)

E23187-01

<dvt:headerCell>

dvt:headerCell headerCell header cell

UIComponent class: oracle.adf.view.faces.bi.component.pivotTable.UIHeaderCell
Component type: oracle.dss.adf.pivotTable.HeaderCell

Each immediate child of a Pivot Table component must either be a <dvt:headerCell> or <dvt:dataCell> component. The Pivot Table should contain at most one headerCell component and at most one dataCell component. These components make it possible to customize the cell content via stamping. The header cell can contain one or more read-only components. This tag also supports customized CSS style for the cells.

Header Cell Features

Stamping

Rather than having a separate child component for each header cell in the pivot table, the child component of the headerCell component is repeatedly rendered (stamped) once per header cell. Because of this stamping behavior, only certain types of components are supported as children inside a Header Cell. See the <dvt:pivotTable> tagdoc for more information.

As the headerCell content is stamped, the data for the current header cell is copied into an EL reachable property. The name of this property is defined by the var property on the Pivot Table. Once the Pivot Table has completed rendering, this property is removed (or reverted back to its previous value).

Supported Child Tags

Examples of components that are supported by <dvt:headerCell> include but are not limited to the following:

The headerCell should have only one child component. If multiple children are desired, they should be wrapped in another component. If no layout is desired, <af:group> can be used, which simply renders its children without adding layout, and is consequently lightweight. If layout is desired, a layout component like <af:panelGroupLayout> can be used instead. If multiple children are present without being wrapped, the current behavior is to vertically stack the components, but no guarantees or support are provided for this usage. To achieve vertical stacking, consider <panelGroupLayout layout="vertical">.

Example

The following example uses <af:switcher> to vary the type of stamped component by layer name (i.e. different content for Geography, Channel, etc.). The example also shows different components that can be used as child tag of <dvt:headerCell>

        
                <dvt:pivotTable id="goodPT"
                      value="#{pivotTableEdit.dataModel}"                                         
                      var="cellData"
                      varStatus="cellStatus">
                  <dvt:headerCell id="hc1">                    
                    <af:switcher id="sw" facetname="O__cellData_layerName_" defaultFacet="Other">
                      <f:facet name="Geography">
                        <af:panelGroupLayout id="pgl1">
                          <af:icon id="i1" name="info" shortDesc="Icon" />
                          <af:outputText id="ot1" value="#{cellData.dataValue}" />  
                        </af:panelGroupLayout>
                      </f:facet>
                      <f:facet name="Channel">
                        <af:commandLink id="cl1" immediate="true" action="guide" text="#{cellData.dataValue}" />  
                      </f:facet>
                      <f:facet name="Product">
                        <af:commandButton id="cb1" text="#{cellData.dataValue}" />  
                      </f:facet>
                      <f:facet name="Other">
                        <af:outputText id="ot2" text="#{cellData.dataValue}" />  
                      </f:facet>
                  </dvt:headerCell>
                </dvt:pivotTable>
        
        

Screen Shot(s)


No image.

Events

Type Phases Description
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 event might include the width of a column that supported client-side resizing.

Attributes

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.
binding String Only EL Binding reference to store the UIHeaderCell component
id String No the identifier for the component. Every component may be named by a component identifier that must conform to the following rules:
  • They must start with a letter (as defined by the Character.isLetter() method) or underscore ( _ ).
  • Subsequent characters must be letters (as defined by the Character.isLetter() method), digits as defined by the Character.isDigit() method, dashes ( - ), or underscores ( _ ). To minimize the size of responses generated by JavaServer Faces, it is recommended that component identifiers be as short as possible. If a component has been given an identifier, it must be unique in the namespace of the closest ancestor to that component that is a NamingContainer (if any).
inlineStyle String Yes The inline style of the header cell's DOM element.
rendered boolean Yes Default Value: true

Specifies whether the component is rendered. The default value is true.
styleClass String Yes Sets a CSS style class to use for this component.
whiteSpace String Yes Sets how white space is handled inside this header cell. If "normal", then the text inside the header cell will wrap. If "noWrap", then the text inside the header cell will not wrap. The default value is "noWrap".