OverviewSince 3.0 The ace:Column renders a HTML td element representing a single column of data in the rows of the iterating parent DataTable. Features of the column and interacting components include:
Getting Started<ace:dataTable var="track" value="#{bean.tracks}"> <ace:column headerText="Album"> <h:outputText value="#{track.album}"/> </ace:column> </ace:dataTable> Attributes
sortBy - Value expression defining the object this column will sort by. <ace:column sortBy="#{track.album}"> <h:outputText value="#{track.album}"/> </ace:column> sortFunction - Value expression for a Comparator<Object> that will be used to sort the objects referred to by sortBy. If this property is not defined, it is assumed that the objects referred to by sortBy implement the Comparable interface. <ace:column sortBy="#{track.album}" sortFunction="#{bean.albumCustomSortFunction}"> <h:outputText value="#{track.album.name}"/> </ace:column> sortPriority - Priority of this column among columns of a multi-column sort, starting at 1. Available for binding in situations of application initated or application persisted sorted states. Having a non-null priority enables sorting for this column when applyFilters() is called on the DataTable. <ace:column sortBy="#{track.album}" sortPriority="#{bean.albumSortPriority}" > <h:outputText value="#{track.album}"/> </ace:column> sortAscending - Boolean value indicating if this sorted (as indicated by a set sortPriority) column is ascending. <ace:column sortBy="#{track.album}" sortAscending="#{bean.albumSortAscending}"> <h:outputText value="#{track.album}"/> </ace:column> filterBy - Value expression defining the object this column will filter by. <ace:column filterBy="#{track.album}"> <h:outputText value="#{track.album}"/> </ace:column> filterValue - Value of the filter input field. The input that will be used to filter the objects defined by filterBy. <ace:column filterBy="#{track.album}" filterValue="#{bean.albumFilterInput}"> <h:outputText value="#{track.album}"/> </ace:column> filterOptions - A collection of SelectItem objects for use as filter choices. public List<SelectItem> filterOptions = new ArrayList<SelectItem>() {{ add(new SelectItem("Van")); add(new SelectItem("Bus")); add(new SelectItem("Compact")); add(new SelectItem("Semi-Truck")); add(new SelectItem("Pickup")); }}; Facelet Markup: <ace:column filterBy="#{track.albumn}" filterOptions="#{bean.filterOptions}"> <h:outputText value="#{track.album}"/> </ace:column> filterMatchMode - Method of String comparison used to evaluate the filter, types available include: "contains", "exact", "startsWith", "endsWith". Defaults to "startsWith". <ace:column filterBy="#{track.albumn}" filterMatchMode="exact"> <h:outputText value="#{track.album}"/> </ace:column> rowspan - Defines the number of Row objects this Column should span. Only relevant on a Column used inside a ColumnGroup and Row component. <ace:columnGroup type="header"> <ace:row> <ace:column colSpan="2"> Track </ace:column> <ace:column rowSpan="2"> Download </ace:column> </ace:row> <ace:row> <ace:column> Artist </ace:column> <ace:column> Album </ace:column> </ace:row> </ace:columnGroup> colspan - Defines the number of TD elements this Column should span. Only relevant on a Column used inside a ColumnGroup and Row component. <ace:columnGroup type="header"> <ace:row> <ace:column colSpan="2"> Track </ace:column> </ace:row> <ace:row> <ace:column> Artist </ace:column> <ace:column> Album </ace:column> </ace:row> </ace:columnGroup> headerText - A plain text header with less effort than adding a facet. Note that even when using a header facet this property should also be set as a short-form label for the column that will be used within the ace:tableConfigPanel.") <ace:column headerText="Album"> <h:outputText value="#{track.album}"/> </ace:column>
TableConfigPanel - Renders a panel allowing the configuration of Column features, like visibility, filtering, sorting and column order in a single compact control. Known IssuesRelated Components |
Column
© Copyright 2021 ICEsoft Technologies Canada Corp.