Oracle Fusion Middleware Tag Reference for Oracle ADF Faces 12c (12.2.1) E52774-01 |
af:column column column
UIComponent class: oracle.adf.view.rich.component.rich.data.RichColumn
Component type: oracle.adf.RichColumn
The immediate children of a Table component must all be <af:column>
components. Each visible Column component creates a separate column in the Table.
Use "headerText" attribute or 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>
shortDesc attribute is currently not supported for the <af:column>
component. Tooltips are automatically displayed for header and data cells if noWrap is turned off and data in the cell is truncated.
In order to make a 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 programmatically turned on with the setSortCritiera()
method on the table.
<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 headerText="Name"> <af:column headerText="First"> <af:outputText value="#{row.firstname}"/> </af:column> <af:column headerText="Last"> <af:outputText value="#{row.lastname}"/> </af:column> </af:column> </af:table>
The data cells in the table rendered by<af:column>
tags can be styled by using styleClass and inlineStyle attributes. The column header cells can be styled using headerClass attribute. Please note that changing padding and border settings through these attributes is very dangerous. We calculate widths on the server side and expect padding and border attributes to be specified as skinning properties. If they get overridden, the aligment of the table cells might be messed up.
<af:table rowSelection="multiple" columnSelection="multiple" columnStretching="last" var="row" value="#{periodicTable.tableData}" summary="table data" id="t1"> <af:column headerText="Element Name" sortable="true" id="column1"> <af:outputText value="#{row.name}" id="ot1"/> </af:column> </af:table>
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. |
Name | Description |
---|---|
context | Location for contextual information. A contextInfo component is expected. This facet is stamped in each cell of the column. |
filter | the node to use to render this column's filter. Table filter fields can be completely model driven. Application developers will be able to use the filterable="true" and "sortProperty" attributes along with "filterModel" to automatically get the filtering support. However if an application developer wants to override the default functionality, they can use the "filter" facet in addition to setting filterable="true" attribute. When doing this, the application developer should also set the alternate filter's label attribute with a helpful label for accessibility mode compatability. For example, for a filter facet set to an inputDate component representing an employee's join date, you could set the inputDate label="Filter: Join Date". Please note that use of varstatus ("vs") property to map values from filterCriteria is deprecated since the completely model driven approach provides similar functionality. For overridding the default functionality from the model see the sample snipped below |
footer | the node to render as this column's footer. |
header | the node to use to render this column's header. |
Name | Type | Supports EL? | Description |
---|---|---|---|
align | String | Yes | Valid Values: start, end, center, left, right The alignment for this column. "start", "end" and "center" are used for left-justified, right-justified, and center-justified respectively in LTR display. "left" or "right" can be used when left-justified or right-justified cells are needed irrespective of the LTR or RTL display. The default value is null, which implies that it is skin dependent and may vary for the row header column vs data column. |
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 | oracle.adf.view.rich.component.rich.data.RichColumn | Only EL | an EL reference that will store the component instance on a bean. This can be used to give programmatic access to a component from a backing bean, or to move creation of the component to a backing bean. |
clientComponent | boolean | Yes | Default Value: false whether a client-side component will be generated. A component may be generated whether or not this flag is set, but if client Javascript requires the component object, this must be set to true to guarantee the component's presence. Client component objects that are generated today by default may not be present in the future; setting this flag is the only way to guarantee a component's presence, and clients cannot rely on implicit behavior. However, there is a performance cost to setting this flag, so clients should avoid turning on client components unless absolutely necessary. For the components outputText and outputFormatted, setting the clientComponent to true will render id attribute for the html DOM. This ID attribute can alternatively be generated by setting oracle.adf.view.rich.SUPPRESS_IDS to "auto" in web.xml. |
colSpan | String | Yes | Default Value: 1 the number of columns a cell should span. Default is 1. If set to "ALL", the column spans all the cell toward the end. Not supported on the following renderkits: org.apache.myfaces.trinidad.core |
customizationId | String | Yes | This attribute is deprecated. The 'id' attribute should be used when applying persistent customizations. This attribute will be removed in the next release. |
displayIndex | int | Yes | Default Value: -1 The display order index of the column. Columns can be re-arranged and they are displayed in the table based on the displayIndex. Columns are sorted based on the displayIndex property, columns without displayIndex are displayed at the end, in the order in which they appear. The displayIndex attribute is honored only for top level columns, since it is not possible to rearrange a child column outside of the parent column. Not supported on the following renderkits: org.apache.myfaces.trinidad.core |
dontPersist | String[] | Yes | a list of attributes whose changes are NOT to be persisted by FilteredPersistenceChangeManager via the "Persistent Change Manager" registered in adf-config.xml. The token 'ALL' can be used in the list here to indicate that all attribute changes that the component implicitly persists should be excluded. If there is a conflict of values, "dontPersist" always precedes "persist". |
filterFeatures | java.util.Set | Yes | The filter features for this column. A set of flags which specify how this column should be filtered in query-by-example (QBE). Currently the only values supported are: "caseSensitive" and "caseInsensitive". If not specified, the case sensitivity is model-dependent. The features are hints for a collection model, which supports filtering, to perform special filtering operations (such as case-sensitive/insensitive filtering) |
filterable | boolean | Yes | Default Value: false whether or not the column is filterable. A filterable column will have a filter field on the top of the column header. Note that in order for a column to be filterable, this attribute must be set to "true" and the filterModel attribute will be set on the table. Only Leaf columns are filterable and the filter component is displayed only if the column header is present. The column header is present if the "headerText" attribute or "header" facet is set on the column. This column's "sortProperty" attribute will be used as a key for the filterProperty in the filterModel. This implies that "sortProperty" *must* be set on the column for it to be filterable. Also look at "filter" facet for providing a component other than the default inputText for filtering. |
footerClass | String | Yes | a CSS style class to use for the column footer. The headerClass, footerClass and the styleClass attributes on the column should be used with caution. Changing the horizontal padding/borders of the header, footer and data cells will mess up alignment of the table cells. |
frozen | boolean | Yes | Default Value: false Specifies whether the column is frozen. In the table columns until the frozen column are locked with the header and not scrolled with the rest of the columns. Frozen attribute is honored only on the top level column,since it is not possible to freeze a child column by itself without its parent being frozen. If the table has a detailStamp for its rows, column freezing is turned off. Not supported on the following renderkits: org.apache.myfaces.trinidad.core |
headerClass | String | Yes | a CSS style class to use for the column header. The headerClass, footerClass and the styleClass attributes on the column should be used with caution. Changing the horizontal padding/borders of the header, footer and data cells will mess up alignment of the table cells. |
headerNoWrap | boolean | Yes | Default Value: false whether or not the column header should be allowed to wrap Not supported on the following renderkits: oracle.adf.rich |
headerText | String | Yes | 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. If a "header" facet is added, headerText will not be rendered in column header. |
helpTopicId | String | Yes | Id used to look up a topic in a helpProvider. |
id | String | No | the identifier for the component. Every component may be named by a component identifier that must conform to the following rules:
|
inlineStyle | String | Yes | the CSS styles to use for this component. This is intended for basic style changes. The inlineStyle is a set of CSS styles that are applied to the root DOM element of the component. Be aware that because of browser CSS precedence rules, CSS rendered on a DOM element takes precedence over external stylesheets like the skin file. Therefore skins will not be able to override what you set on this attribute. If the inlineStyle's CSS properties do not affect the DOM element you want affected, then you will have to create a skin and use the skinning keys which are meant to target particular DOM elements, like ::label or ::icon-style. |
minimumWidth | String | Yes | Default Value: 12 The minimum number of pixels that the column can become. When a user attempts to resize the column, this minimum width will be enforced. Also, when a column is flexible, it will also never be stretched to be a size smaller than this minimum width. If a pixel width is defined and if the minimum width is larger, the minimum width will become the smaller of the two values. By default, the minimum width is 12 pixels. Not supported on the following renderkits: org.apache.myfaces.trinidad.core |
noWrap | boolean | Yes | Default Value: true Specifies whether whitespace wrapping should be allowed in this column. |
partialTriggers | String[] | Yes | 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. Identifiers are relative to the source component (this component), and must account for NamingContainers. If your component is already inside of a naming container, you can use a single colon to start the search from the root of the page, or multiple colons to move up through the NamingContainers - "::" will pop out of the component's naming container (or itself if the component is a naming container) and begin the search from there, ":::" will pop out of two naming containers (including itself if the component is a naming container) and begin the search from there, etc. |
persist | String[] | Yes | a list of attributes whose changes are to be persisted by FilteredPersistenceChangeManager via the "Persistent Change Manager" registered in adf-config.xml. The token 'ALL' can be used in the list here to indicate that all attribute changes that the component implicitly persists should be included. |
rendered | boolean | Yes | Default Value: true whether the component is rendered. When set to false, no output will be delivered for this component (the component will not in any way be rendered, and cannot be made visible on the client). If you want to change a component's rendered attribute from false to true using PPR, set the partialTrigger attribute of its parent component so the parent refreshes and in turn will render this component. |
rowHeader | String | Yes | Valid Values: true, false, unstyled Default Value: false Whether or not this column is considered a row header column for the table. Valid values are "true", "false", and "unstyled". The default value is "false" and results in no special handling. A column that is marked as rowHeader "true" is moved to the starting position (displayIndex = 0) and is automatically frozen. A value of "unstyled" indicates that the column is a row header for screen reader mode purposes, but there are no visual changes done to the column in rich mode. A value of "unstyled" is typically used when you want to indicate a row header for accessibility requirements, but don't want any visual changes made to your column or table in regular rich mode. In screen reader mode, when the rowHeader is set to "true" or "unstyled" the column is marked as a row header and moved to the starting position. It is required for accessibility that at least one column to be marked as a row header and that the rowHeader provides unique textual information. Also note that for a table with row selection enabled, at least one column in the table will need to be set as a row header with rowHeader=true. This is needed to allow keyboard row selection. |
selected | boolean | Yes | Default Value: false Specifies whether the column is selected. Not supported on the following renderkits: org.apache.myfaces.trinidad.core |
separateRows | boolean | Yes | Default Value: false This property is currently not supported in the rich client. Not supported on the following renderkits: oracle.adf.rich |
shortDesc | String | Yes | This will display a small popup on the screen. Use the helpTopicId instead of this field. Not supported on the following renderkits: oracle.adf.rich |
showRequired | boolean | Yes | Default Value: false Indicates whether the columns displays a visual indication of required user input. |
sortProperty | String | Yes | The property that is displayed by this Column. This is the property that the framework might use to (for example) sort the Table's data. |
sortStrength | String | Yes | Valid Values: Primary, Secondary, Tertiary, Identical Default Value: Identical The sorting strength for this column. It controls how this column should be sorted, what level of difference considered significant during comparison. Currently the values supported are: "Primary", "Secondary", "Tertiary" and "Identical". Default value is "Identical". |
sortable | boolean | Yes | Default Value: false 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. |
styleClass | String | Yes | a CSS style class to use for this component. The style class can be defined in your jspx page or in a skinning CSS file, for example, or you can use one of our public style classes, like 'AFInstructionText'. |
visible | boolean | Yes | Default Value: true the visibility of the column. If it is "false", the column will not be displayed in the table on the client. Unlike "rendered", this does affect the lifecycle on the server - the column may have its bindings executed, etc. When "rendered" is false, the component will not in any way be rendered, and cannot be made visible on the client. Not supported on the following renderkits: org.apache.myfaces.trinidad.core |
width | String | Yes | Default Value: 100 The width of the column. The default width for a column is 100px. There is no auto sizing for columns. Set the width attribute to ensure the column is wide enough to accommodate the width of the contents. When the "multiple" option is used in the table that contains the column, the width can be set to a percentage. Non-group column widths as percentages will be honored. When widths using percentages exist and the table columnStretching is set to "multiple", the percentages are used to determine a normalized ratio. For example, if two columns have their widths set to "100%", they will each be normalized to take up .5 times the stretchable space. Stretchable space is defined as the space after px widths are taken into account. Minimum widths are honored by the stretching. |