What You May Need to Know About Using the Iterator Tag

10-30 Web User Interface Developers Guide for Oracle Application Development Framework

10.4 Enabling Filtering in Tables

You can add a filter to a table that can be used so that the table displays only rows whose values match the filter. When enabled and set to visible, a search criteria input field displays above each searchable column. For example, the table in Figure 10–18 has been filtered to display only rows in which the Location value is 1700. Figure 10–18 Filtered Table Filtered table searches are based on Query-by-Example and use the QBE text or date input field formats. The input validators are turned off to allow for entering characters for operators such as and to modify the search criteria. For example, you can enter 1500 as the search criteria for a number column. Wildcard characters may also be supported. Searches can be either case-sensitive or case-insensitive. If a column does not support QBE, the search criteria input field will not render for that column. The filtering feature uses a model for filtering data into the table. The table’s filterModel attribute object must be bound to an instance of the FilterableQueryDescriptor class. In Example 10–9 , the table filterVisible attribute is set to true to enable the filter input fields, and the sortProperty attribute is set on the column to identify the column in the filterModel instance. Each column element has its filterable attribute set to true. Example 10–9 Table Component with Filtering Enabled af:table value={myBean.products} var=row ... filterVisible=true ... rowselection=single ... af:column sortProperty=ProductID filterable=true sortable=true af:outputText value={row.ProductID} ... af:column af:column sortProperty=Name filterable=true sortable=true af:outputText value={row.Name} Note: If your application uses the Fusion technology stack, then you can use data controls to create tables and filtering will be created for you. For more information see the Creating ADF Databound Tables chapter of the Oracle Fusion Middleware Web User Interface Developers Guide for Oracle Application Development Framework