public class UIHeaderCell
extends org.apache.myfaces.trinidad.component.UIXComponentBase
implements javax.faces.component.NamingContainer
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.
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.
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).
Examples of components that are supported by <dvt:headerCell> include but are not limited to the following:
<af:switcher><af:outputText><af:commandLink>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">.
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="#{cellData.layerName}" defaultFacet="Other">
<f:facet name="Geography">
<af:panelGroupLayout id="pgl1">
<af:icon id="i1" name="info" shortDesc="level:#{cellData.indent}" />
<af:outputText id="ot1" value="#{cellData.label}" />
</af:panelGroupLayout>
</f:facet>
<f:facet name="Channel">
<af:commandLink id="cl1" immediate="true" action="guide" text="#{cellData.label}" />
</f:facet>
<f:facet name="Product">
<af:commandButton id="cb1" text="#{cellData.label}" />
</f:facet>
<f:facet name="Other">
<af:outputText id="ot2" text="#{cellData.label}" />
</f:facet>
</dvt:headerCell>
</dvt:pivotTable>
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
COMPONENT_FAMILY |
static java.lang.String |
COMPONENT_TYPE |
static org.apache.myfaces.trinidad.bean.PropertyKey |
INLINE_STYLE_KEY |
static org.apache.myfaces.trinidad.bean.PropertyKey |
STYLE_CLASS_KEY |
static org.apache.myfaces.trinidad.bean.FacesBean.Type |
TYPE |
static org.apache.myfaces.trinidad.bean.PropertyKey |
WHITE_SPACE_KEY |
static java.lang.String |
WHITE_SPACE_NORMAL |
static java.lang.String |
WHITE_SPACE_NOWRAP |
BINDING_KEY, ID_KEY, RENDERED_KEY, RENDERER_TYPE_KEY, TRANSIENT_KEY| Constructor and Description |
|---|
UIHeaderCell()
Constructs a new
UIHeaderCell. |
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.myfaces.trinidad.bean.FacesBean.Type |
getBeanType() |
java.lang.String |
getFamily()
Returns the identifier of the component family to which this component belongs.
|
java.lang.String |
getInlineStyle()
Retrieves the inline style of the data cell.
|
java.lang.String |
getStyleClass()
Retrieves the CSS style class to use for this component.
|
java.lang.String |
getWhiteSpace()
Retrieves how white space should be handled in the header cell.
|
void |
setInlineStyle(java.lang.String inlineStyle)
Specifies the inline style of the data cell.
|
void |
setStyleClass(java.lang.String styleClass)
Sets a CSS style class to use for this component.
|
void |
setWhiteSpace(java.lang.String whiteSpace)
Sets how white space should be handled in the header cell.
|
adaptMethodBinding, addAttributeChange, addAttributeChangeListener, addClientBehavior, addComponentChange, addComponentChange, addComponentChangeFilter, addFacesListener, broadcast, broadcastToMethodBinding, broadcastToMethodExpression, clearInitialState, createFacesBean, decode, decodeChildren, decodeChildrenImpl, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributeChangeListener, getAttributeChangeListeners, getAttributes, getBooleanProperty, getChildCount, getChildren, getClientBehaviors, getClientId, getComponentChangeFilters, getContainerClientId, getDefaultEventName, getFacesBean, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacetNames, getFacets, getFacetsAndChildren, getId, getIntProperty, getLifecycleRenderer, getListenersForEventClass, getParent, getProperty, getPropertyKey, getRenderedFacetsAndChildren, getRenderer, getRendererType, getRendersChildren, getValueBinding, getValueExpression, initialStateMarked, invokeOnChildrenComponents, invokeOnComponent, invokeOnNamingContainerComponent, isRendered, isTransient, markInitialState, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeAttributeChangeListener, removeComponentChangeFilter, removeFacesListener, restoreState, satisfiesPartialTrigger, saveState, setAttributeChangeListener, setAttributeChangeListener, setBooleanProperty, setId, setIntProperty, setParent, setProperty, setRendered, setRendererType, setTransient, setupFlattenedChildrenContext, setupFlattenedContext, setValueBinding, setValueExpression, subscribeToEvent, tearDownFlattenedChildrenContext, tearDownFlattenedContext, toString, unsubscribeFromEvent, updateChildren, updateChildrenImpl, validateChildren, validateChildrenImpladdPartialTarget, clearCachedClientIds, clearCachedClientIds, encodeFlattenedChild, encodeFlattenedChildren, getLogicalParent, getLogicalParent, getStateHelper, getStateHelper, isVisitable, partialEncodeVisit, processFlattenedChildren, processFlattenedChildren, processFlattenedChildren, processFlattenedChildren, setPartialTarget, setupChildrenEncodingContext, setupChildrenVisitingContext, setupEncodingContext, setUpEncodingContext, setupVisitingContext, tearDownChildrenEncodingContext, tearDownChildrenVisitingContext, tearDownEncodingContext, tearDownVisitingContext, visitAllChildren, visitChildren, visitChildren, visitTree, visitTreeencodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getResourceBundleMap, getTransientStateHelper, getTransientStateHelper, isCompositeComponent, isInView, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInViewpublic static final java.lang.String WHITE_SPACE_NORMAL
public static final java.lang.String WHITE_SPACE_NOWRAP
public static final org.apache.myfaces.trinidad.bean.FacesBean.Type TYPE
public static final org.apache.myfaces.trinidad.bean.PropertyKey INLINE_STYLE_KEY
public static final org.apache.myfaces.trinidad.bean.PropertyKey STYLE_CLASS_KEY
public static final org.apache.myfaces.trinidad.bean.PropertyKey WHITE_SPACE_KEY
public static final java.lang.String COMPONENT_FAMILY
public static final java.lang.String COMPONENT_TYPE
public java.lang.String getInlineStyle()
public void setInlineStyle(java.lang.String inlineStyle)
inlineStyle - the data cell's inline stylepublic java.lang.String getStyleClass()
public void setStyleClass(java.lang.String styleClass)
styleClass - the data cell's style classpublic java.lang.String getWhiteSpace()
public void setWhiteSpace(java.lang.String whiteSpace)
whiteSpace - public java.lang.String getFamily()
rendererType property, may
be used to select the appropriate Renderer for this component instance.getFamily in class org.apache.myfaces.trinidad.component.UIXComponentBaseprotected org.apache.myfaces.trinidad.bean.FacesBean.Type getBeanType()
getBeanType in class org.apache.myfaces.trinidad.component.UIXComponentBase