In 11g, I like af:panelCollection (Panel Collection) component. I like it, because I can surround af:table component with Panel Collection and get additional functionality for free. For example, often there is a requirement not to show specific columns by default, however allow user to select them later. In 10g, there was no standard way to do this, in 11g it comes with Panel Collection functionality.
In this example, af:table is surrounded by af:panelCollection:
Let's say we will hide some column, one of them will be Email. Column is hided by setting Visible property to false:
On runtime, af:panelCollection will be rendered with View menu item and other features. It contains toolbar facet, I have dragged and dropped my buttons there. From View menu item I can select Columns section, where all table columns are listed. Those columns, hidden by default, are listed as well:
When user selects one from the list, for example Email, our table is refreshed and previously hidden column becomes visible:
Download sample application - PanelCollection.zip.
Titulo: Esconder columnas en un Panel Collection.
Resumen: En este ejemplo observaremos como aprovechar el Panel Collection para definir columnas ocultas las cuales luego pueden ser mostradas dinámicamente por los usuarios.