oracle.adf.view.faces.component.core.data
Class CoreColumn

java.lang.Object
  extended byjavax.faces.component.UIComponent
      extended byoracle.adf.view.faces.component.UIXComponent
          extended byoracle.adf.view.faces.component.UIXComponentBase
              extended byoracle.adf.view.faces.component.UIXColumn
                  extended byoracle.adf.view.faces.component.core.data.CoreColumn
All Implemented Interfaces:
StateHolder

public class CoreColumn
extends UIXColumn

The immediate children of a Table component must all be <af:column> components. Each visible ADF Column component creates a separate column in the Table.

Use the "header" facet on a Column to create the column header. The following example creates a two-column table with the column headers - "Firstname" and "Lastname":

   <af:table>
     <af:column>
       <f:facet name="header">
         <af:outputText value="Firstname"/>
       </f:facet>
       ...
     </af:column>
     <af:column>
       <f:facet name="header">
         <af:outputText value="Lastname"/>
       </f:facet>
       ...
     </af:column>
   </af:table>

The child components of each Column display the data for each row in that column. The Column does not create child components per row; instead, each child is repeatedly rendered (stamped) once per row. Because of this stamping behavior, only certain types of components are supported as children inside a Column. Supported components include all components with no behavior and most components that implement the EditableValueHolder or ActionSource interfaces.

As each row is stamped, the data for the current row ( see getRowData() on the Table) is copied into an EL reachable property. The name of this property is defined by the var property on the Table. Once the Table has completed rendering, this property is removed (or reverted back to its previous value). In the following example, the data for each row is placed under the EL property "row". Each Column displays the data for each row by getting further properties from the "row" property:

   <af:table var="row" value="#{myBean.employees}">
     <af:column>
       <af:outputText value="#{row.firstname}"/>
     </af:column>
     <af:column>
       af:outputText value="#{row.lastname}"/>
     </af:column>
   </af:table>

Formatting

The Column component supports the following attributes related to formatting:

formatType
The type of formatting to use for this column. This atribute controls left, right or center justification of the column data.
gridVisible
Controls the display of a grid line on the left of the column.
width
The width of this column.
bandingShade
Determines what background color to use for this column.
noWrap
Controls whether long lines of text in the column data should be wrapped.
headerNoWrap
Controls whether long lines of text in the column header should be wrapped.
separateRows
Controls whether each child of this column should be rendered in separate cells, or inside the same cell.

Sorting

In order to make this Column sortable, set the "sortable" property to true and set "sortProperty" to the name of the model that this column will sort. Sorting can be programatically turned on with the setSortCritiera() method on the\ table.

Column Groups

<af:column> tags can be nested to produce groups of columns. The header of a column group spans across all the columns it contains. The following example creates a column group that has the header "Name" and contains two sub columns with headers "First" and "Last":

   <af:table var="row" value="#{myBean.employees}">
     <af:column>
       <f:facet name="header">
         <af:outputText value="Name"/>
       </f:facet>
       <af:column>
         <f:facet name="header">
           <af:outputText value="First"/>
         </f:facet>
         <af:outputText value="#{row.firstname}"/>
       </af:column>
       <af:column>
         <f:facet name="header">
           <af:outputText value="Last"/>
         </f:facet>
         af:outputText value="#{row.lastname}"/>
       </af:column>
     </af:column>
   </af:table>

Example:



Field Summary
static java.lang.String BANDING_SHADE_DARK
          Enumerated value indicating that dark shading should be used.
static PropertyKey BANDING_SHADE_KEY
           
static java.lang.String BANDING_SHADE_LIGHT
          Enumerated value indicating that light shading should be used.
static java.lang.String COMPONENT_FAMILY
           
static java.lang.String COMPONENT_TYPE
           
static java.lang.String FORMAT_TYPE_ICON
          Enumerated value indicating that the column should be formatted for icons.
static PropertyKey FORMAT_TYPE_KEY
           
static java.lang.String FORMAT_TYPE_NUMBER
          Enumerated value indicating that the column should be formatted for numbers.
static java.lang.String FORMAT_TYPE_TEXT
          Enumerated value indicating that the column should be formatted for text.
static PropertyKey GRID_VISIBLE_KEY
           
static PropertyKey HEADER_NO_WRAP_KEY
           
static PropertyKey HEADER_TEXT_KEY
           
static PropertyKey INLINE_STYLE_KEY
           
static PropertyKey NO_WRAP_KEY
           
static PropertyKey ONCLICK_KEY
           
static PropertyKey ONDBLCLICK_KEY
           
static PropertyKey ONKEYDOWN_KEY
           
static PropertyKey ONKEYPRESS_KEY
           
static PropertyKey ONKEYUP_KEY
           
static PropertyKey ONMOUSEDOWN_KEY
           
static PropertyKey ONMOUSEMOVE_KEY
           
static PropertyKey ONMOUSEOUT_KEY
           
static PropertyKey ONMOUSEOVER_KEY
           
static PropertyKey ONMOUSEUP_KEY
           
static PropertyKey PARTIAL_TRIGGERS_KEY
           
static PropertyKey ROW_HEADER_KEY
           
static PropertyKey SEPARATE_ROWS_KEY
           
static PropertyKey SHORT_DESC_KEY
           
static PropertyKey SORTABLE_KEY
           
static PropertyKey STYLE_CLASS_KEY
           
static FacesBean.Type TYPE
           
static PropertyKey WIDTH_KEY
           
 
Fields inherited from class oracle.adf.view.faces.component.UIXColumn
FOOTER_FACET, HEADER_FACET, SORT_PROPERTY_KEY
 
Fields inherited from class oracle.adf.view.faces.component.UIXComponentBase
BINDING_KEY, ID_KEY, RENDERED_KEY, RENDERER_TYPE_KEY, TRANSIENT_KEY
 
Constructor Summary
  CoreColumn()
          Construct an instance of the CoreColumn.
protected CoreColumn(java.lang.String rendererType)
          Construct an instance of the CoreColumn.
 
Method Summary
 java.lang.String getBandingShade()
          Gets the background color to use for this column.
protected  FacesBean.Type getBeanType()
           
 java.lang.String getFamily()
           
 java.lang.String getFormatType()
          Gets the type of formatting to use for this column.
 java.lang.String getHeaderText()
          Gets text to display in the header of the column.
 java.lang.String getInlineStyle()
          Gets the inline CSS style for this element
 java.lang.String getOnclick()
          Gets an onclick Javascript handler.
 java.lang.String getOndblclick()
          Gets an ondblclick Javascript handler.
 java.lang.String getOnkeydown()
          Gets an onkeydown Javascript handler.
 java.lang.String getOnkeypress()
          Gets an onkeypress Javascript handler.
 java.lang.String getOnkeyup()
          Gets an onkeyup Javascript handler.
 java.lang.String getOnmousedown()
          Gets an onmousedown Javascript handler.
 java.lang.String getOnmousemove()
          Gets an onmousemove Javascript handler.
 java.lang.String getOnmouseout()
          Gets an onmouseout Javascript handler.
 java.lang.String getOnmouseover()
          Gets an onmouseover Javascript handler.
 java.lang.String getOnmouseup()
          Gets an onmouseup Javascript handler.
 java.lang.String[] getPartialTriggers()
          Gets the IDs of the components that should trigger a partial update.
 java.lang.String getShortDesc()
          Gets the short description of the bean.
 java.lang.String getStyleClass()
          Gets the CSS style class of the bean.
 java.lang.String getWidth()
          Gets the preferred width of this column, e.g., "30%", "100px".
 boolean isGridVisible()
          Gets whether or not to display a grid line before the column's content (to the left in a left-to-right locale).
 boolean isHeaderNoWrap()
          Gets whether or not the column header should be allowed to wrap
 boolean isNoWrap()
          Gets whether or not the column contents should be allowed to wrap
 boolean isRowHeader()
          Gets Whether or not this column is a row header column.
 boolean isSeparateRows()
          Gets whether or not the children of this column should be rendered on separate rows.
 boolean isSortable()
          Gets whether or not the column is sortable.
 void setBandingShade(java.lang.String bandingShade)
          Sets the background color to use for this column.
 void setFormatType(java.lang.String formatType)
          Sets the type of formatting to use for this column.
 void setGridVisible(boolean gridVisible)
          Sets whether or not to display a grid line before the column's content (to the left in a left-to-right locale).
 void setHeaderNoWrap(boolean headerNoWrap)
          Sets whether or not the column header should be allowed to wrap
 void setHeaderText(java.lang.String headerText)
          Sets text to display in the header of the column.
 void setInlineStyle(java.lang.String inlineStyle)
          Sets the inline CSS style for this element
 void setNoWrap(boolean noWrap)
          Sets whether or not the column contents should be allowed to wrap
 void setOnclick(java.lang.String onclick)
          Sets an onclick Javascript handler.
 void setOndblclick(java.lang.String ondblclick)
          Sets an ondblclick Javascript handler.
 void setOnkeydown(java.lang.String onkeydown)
          Sets an onkeydown Javascript handler.
 void setOnkeypress(java.lang.String onkeypress)
          Sets an onkeypress Javascript handler.
 void setOnkeyup(java.lang.String onkeyup)
          Sets an onkeyup Javascript handler.
 void setOnmousedown(java.lang.String onmousedown)
          Sets an onmousedown Javascript handler.
 void setOnmousemove(java.lang.String onmousemove)
          Sets an onmousemove Javascript handler.
 void setOnmouseout(java.lang.String onmouseout)
          Sets an onmouseout Javascript handler.
 void setOnmouseover(java.lang.String onmouseover)
          Sets an onmouseover Javascript handler.
 void setOnmouseup(java.lang.String onmouseup)
          Sets an onmouseup Javascript handler.
 void setPartialTriggers(java.lang.String[] partialTriggers)
          Sets the IDs of the components that should trigger a partial update.
 void setRowHeader(boolean rowHeader)
          Sets Whether or not this column is a row header column.
 void setSeparateRows(boolean separateRows)
          Sets whether or not the children of this column should be rendered on separate rows.
 void setShortDesc(java.lang.String shortDesc)
          Sets the short description of the bean.
 void setSortable(boolean sortable)
          Sets whether or not the column is sortable.
 void setStyleClass(java.lang.String styleClass)
          Sets the CSS style class of the bean.
 void setWidth(java.lang.String width)
          Sets the preferred width of this column, e.g., "30%", "100px".
 
Methods inherited from class oracle.adf.view.faces.component.UIXColumn
getFooter, getHeader, getSortProperty, processDecodes, processUpdates, processValidators, setFooter, setHeader, setSortProperty
 
Methods inherited from class oracle.adf.view.faces.component.UIXComponentBase
addAttributeChange, addAttributeChange, addAttributeChangeListener, addFacesListener, broadcast, createFacesBean, decode, decodeChildren, decodeChildrenImpl, encodeAll, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributeChangeListener, getAttributeChangeListeners, getAttributes, getBooleanProperty, getChildCount, getChildren, getClientId, getFacesBean, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacetNames, getFacets, getFacetsAndChildren, getId, getIntProperty, getLifecycleRenderer, getLocalClientId, getParent, getProperty, getPropertyKey, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processRestoreState, processSaveState, queueEvent, removeAttributeChangeListener, removeFacesListener, restoreState, saveState, setAttributeChangeListener, setBooleanProperty, setId, setIntProperty, setParent, setProperty, setRendered, setRendererType, setTransient, setValueBinding, toString, updateChildren, updateChildrenImpl, validateChildren, validateChildrenImpl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FORMAT_TYPE_TEXT

public static final java.lang.String FORMAT_TYPE_TEXT
Enumerated value indicating that the column should be formatted for text.

See Also:
Constant Field Values

FORMAT_TYPE_ICON

public static final java.lang.String FORMAT_TYPE_ICON
Enumerated value indicating that the column should be formatted for icons.

See Also:
Constant Field Values

FORMAT_TYPE_NUMBER

public static final java.lang.String FORMAT_TYPE_NUMBER
Enumerated value indicating that the column should be formatted for numbers.

See Also:
Constant Field Values

BANDING_SHADE_DARK

public static final java.lang.String BANDING_SHADE_DARK
Enumerated value indicating that dark shading should be used.

See Also:
Constant Field Values

BANDING_SHADE_LIGHT

public static final java.lang.String BANDING_SHADE_LIGHT
Enumerated value indicating that light shading should be used.

See Also:
Constant Field Values

TYPE

public static final FacesBean.Type TYPE

FORMAT_TYPE_KEY

public static final PropertyKey FORMAT_TYPE_KEY

GRID_VISIBLE_KEY

public static final PropertyKey GRID_VISIBLE_KEY

WIDTH_KEY

public static final PropertyKey WIDTH_KEY

HEADER_TEXT_KEY

public static final PropertyKey HEADER_TEXT_KEY

BANDING_SHADE_KEY

public static final PropertyKey BANDING_SHADE_KEY

NO_WRAP_KEY

public static final PropertyKey NO_WRAP_KEY

HEADER_NO_WRAP_KEY

public static final PropertyKey HEADER_NO_WRAP_KEY

SORTABLE_KEY

public static final PropertyKey SORTABLE_KEY

SEPARATE_ROWS_KEY

public static final PropertyKey SEPARATE_ROWS_KEY

ROW_HEADER_KEY

public static final PropertyKey ROW_HEADER_KEY

SHORT_DESC_KEY

public static final PropertyKey SHORT_DESC_KEY

PARTIAL_TRIGGERS_KEY

public static final PropertyKey PARTIAL_TRIGGERS_KEY

ONCLICK_KEY

public static final PropertyKey ONCLICK_KEY

ONDBLCLICK_KEY

public static final PropertyKey ONDBLCLICK_KEY

ONMOUSEDOWN_KEY

public static final PropertyKey ONMOUSEDOWN_KEY

ONMOUSEUP_KEY

public static final PropertyKey ONMOUSEUP_KEY

ONMOUSEOVER_KEY

public static final PropertyKey ONMOUSEOVER_KEY

ONMOUSEMOVE_KEY

public static final PropertyKey ONMOUSEMOVE_KEY

ONMOUSEOUT_KEY

public static final PropertyKey ONMOUSEOUT_KEY

ONKEYPRESS_KEY

public static final PropertyKey ONKEYPRESS_KEY

ONKEYDOWN_KEY

public static final PropertyKey ONKEYDOWN_KEY

ONKEYUP_KEY

public static final PropertyKey ONKEYUP_KEY

STYLE_CLASS_KEY

public static final PropertyKey STYLE_CLASS_KEY

INLINE_STYLE_KEY

public static final PropertyKey INLINE_STYLE_KEY

COMPONENT_FAMILY

public static final java.lang.String COMPONENT_FAMILY
See Also:
Constant Field Values

COMPONENT_TYPE

public static final java.lang.String COMPONENT_TYPE
See Also:
Constant Field Values
Constructor Detail

CoreColumn

public CoreColumn()
Construct an instance of the CoreColumn.


CoreColumn

protected CoreColumn(java.lang.String rendererType)
Construct an instance of the CoreColumn.

Method Detail

getFormatType

public final java.lang.String getFormatType()
Gets the type of formatting to use for this column. The legal values are "text", "number" and "icon", which describe columns that display text, numbers and buttons, respectively. Text columns are left-justified, number columns are right-justified, and button columns are center-justified.


setFormatType

public final void setFormatType(java.lang.String formatType)
Sets the type of formatting to use for this column. The legal values are "text", "number" and "icon", which describe columns that display text, numbers and buttons, respectively. Text columns are left-justified, number columns are right-justified, and button columns are center-justified.


isGridVisible

public final boolean isGridVisible()
Gets whether or not to display a grid line before the column's content (to the left in a left-to-right locale).


setGridVisible

public final void setGridVisible(boolean gridVisible)
Sets whether or not to display a grid line before the column's content (to the left in a left-to-right locale).


getWidth

public final java.lang.String getWidth()
Gets the preferred width of this column, e.g., "30%", "100px".


setWidth

public final void setWidth(java.lang.String width)
Sets the preferred width of this column, e.g., "30%", "100px".


getHeaderText

public final java.lang.String getHeaderText()
Gets text to display in the header of the column. This is a convenience that generates output equivalent to adding a "header" facet containing an outputText.


setHeaderText

public final void setHeaderText(java.lang.String headerText)
Sets text to display in the header of the column. This is a convenience that generates output equivalent to adding a "header" facet containing an outputText.


getBandingShade

public final java.lang.String getBandingShade()
Gets the background color to use for this column. The legal values are "light" and "dark".


setBandingShade

public final void setBandingShade(java.lang.String bandingShade)
Sets the background color to use for this column. The legal values are "light" and "dark".


isNoWrap

public final boolean isNoWrap()
Gets whether or not the column contents should be allowed to wrap


setNoWrap

public final void setNoWrap(boolean noWrap)
Sets whether or not the column contents should be allowed to wrap


isHeaderNoWrap

public final boolean isHeaderNoWrap()
Gets whether or not the column header should be allowed to wrap


setHeaderNoWrap

public final void setHeaderNoWrap(boolean headerNoWrap)
Sets whether or not the column header should be allowed to wrap


isSortable

public final boolean isSortable()
Gets whether or not the column is sortable. A sortable column has a clickable header that (when clicked) sorts the table by that column's property. Note that in order for a column to be sortable, this attribute must be set to "true" and the underlying model must support sorting by this column's property. This column's "sortProperty" attribute must be set if sorting is desired.


setSortable

public final void setSortable(boolean sortable)
Sets whether or not the column is sortable. A sortable column has a clickable header that (when clicked) sorts the table by that column's property. Note that in order for a column to be sortable, this attribute must be set to "true" and the underlying model must support sorting by this column's property. This column's "sortProperty" attribute must be set if sorting is desired.


isSeparateRows

public final boolean isSeparateRows()
Gets whether or not the children of this column should be rendered on separate rows. Setting this attribute to true will cause each child to render in its own row. Setting this to false will cause all the children to be rendered in one cell, which will rowSpan across the rows of the Columns whose children are rendered on separate rows. This attribute is not supported on the following agent types: phone, voice.


setSeparateRows

public final void setSeparateRows(boolean separateRows)
Sets whether or not the children of this column should be rendered on separate rows. Setting this attribute to true will cause each child to render in its own row. Setting this to false will cause all the children to be rendered in one cell, which will rowSpan across the rows of the Columns whose children are rendered on separate rows. This attribute is not supported on the following agent types: phone, voice.


isRowHeader

public final boolean isRowHeader()
Gets Whether or not this column is a row header column.


setRowHeader

public final void setRowHeader(boolean rowHeader)
Sets Whether or not this column is a row header column.


getShortDesc

public final java.lang.String getShortDesc()
Gets the short description of the bean. This text is commonly used by user agents to display tooltip help text.


setShortDesc

public final void setShortDesc(java.lang.String shortDesc)
Sets the short description of the bean. This text is commonly used by user agents to display tooltip help text.


getPartialTriggers

public final java.lang.String[] getPartialTriggers()
Gets the IDs of the components that should trigger a partial update. 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.


setPartialTriggers

public final void setPartialTriggers(java.lang.String[] partialTriggers)
Sets the IDs of the components that should trigger a partial update. 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.


getOnclick

public final java.lang.String getOnclick()
Gets an onclick Javascript handler.


setOnclick

public final void setOnclick(java.lang.String onclick)
Sets an onclick Javascript handler.


getOndblclick

public final java.lang.String getOndblclick()
Gets an ondblclick Javascript handler.


setOndblclick

public final void setOndblclick(java.lang.String ondblclick)
Sets an ondblclick Javascript handler.


getOnmousedown

public final java.lang.String getOnmousedown()
Gets an onmousedown Javascript handler.


setOnmousedown

public final void setOnmousedown(java.lang.String onmousedown)
Sets an onmousedown Javascript handler.


getOnmouseup

public final java.lang.String getOnmouseup()
Gets an onmouseup Javascript handler.


setOnmouseup

public final void setOnmouseup(java.lang.String onmouseup)
Sets an onmouseup Javascript handler.


getOnmouseover

public final java.lang.String getOnmouseover()
Gets an onmouseover Javascript handler.


setOnmouseover

public final void setOnmouseover(java.lang.String onmouseover)
Sets an onmouseover Javascript handler.


getOnmousemove

public final java.lang.String getOnmousemove()
Gets an onmousemove Javascript handler.


setOnmousemove

public final void setOnmousemove(java.lang.String onmousemove)
Sets an onmousemove Javascript handler.


getOnmouseout

public final java.lang.String getOnmouseout()
Gets an onmouseout Javascript handler.


setOnmouseout

public final void setOnmouseout(java.lang.String onmouseout)
Sets an onmouseout Javascript handler.


getOnkeypress

public final java.lang.String getOnkeypress()
Gets an onkeypress Javascript handler.


setOnkeypress

public final void setOnkeypress(java.lang.String onkeypress)
Sets an onkeypress Javascript handler.


getOnkeydown

public final java.lang.String getOnkeydown()
Gets an onkeydown Javascript handler.


setOnkeydown

public final void setOnkeydown(java.lang.String onkeydown)
Sets an onkeydown Javascript handler.


getOnkeyup

public final java.lang.String getOnkeyup()
Gets an onkeyup Javascript handler.


setOnkeyup

public final void setOnkeyup(java.lang.String onkeyup)
Sets an onkeyup Javascript handler.


getStyleClass

public final java.lang.String getStyleClass()
Gets the CSS style class of the bean.


setStyleClass

public final void setStyleClass(java.lang.String styleClass)
Sets the CSS style class of the bean.


getInlineStyle

public final java.lang.String getInlineStyle()
Gets the inline CSS style for this element


setInlineStyle

public final void setInlineStyle(java.lang.String inlineStyle)
Sets the inline CSS style for this element


getFamily

public java.lang.String getFamily()
Overrides:
getFamily in class UIXColumn

getBeanType

protected FacesBean.Type getBeanType()
Overrides:
getBeanType in class UIXColumn


Copyright © 2003-2007 Oracle Corporation. All Rights Reserved.