Passing a Row as a Value

Using Tables and Trees 10-45

10.8.1 How to Add a panelCollection with a Table, Tree, or Tree Table

You add a panelCollection component and then add the table, tree, or tree table inside the panelCollection component. You can then add and modify the menus and toolbars for it. To create a panelCollection component with an aggregate display component: 1. In the Component Palette, from the Layout panel, drag and drop a Panel Collection onto the page. Add the table, tree, or tree table as a child to that component. Alternatively, if the table, tree, or tree table already exists on the page, you can right-click the component and choose Surround With. Then select Panel Collection to wrap the component with the panelCollection component.

2. Optionally, customize the panelCollection toolbar by turning off specific

toolbar and menu items. To do so, select the panelCollection component in the Structure window. In the Property Inspector, set the featuresOff attribute. Table 10–1 shows the valid values and the corresponding effect on the toolbar. Tip: You can make menus detachable in the panelCollection component. For more information, see Section 14.2, Using Menus in a Menu Bar. Consider using detached menus when you expect users to do any of the following: ■ Execute similar commands repeatedly on a page. ■ Execute similar commands on different rows of data in a large table, tree table, or tree. ■ View data in long and wide tables or tree tables, and trees. Users can choose which columns or branches to hide or display with a single click. ■ Format data in long or wide tables, tree tables, or trees. Table 10–1 Valid Values for the featuresOff Attribute Value Will not display... statusBar status bar viewMenu View menu formatMenu Format menu columnsMenuItem Columns menu item in the View menu columnsMenuItem:colId For example: columnsMenuItem:col1, col2 Columns with matching IDs in the Columns menu For example, the value to the left would not display the columns whose IDs are col1 and col2 freezeMenuItem Freeze menu item in the View menu detachMenuItem Detach menu item in the View menu sortMenuItem Sort menu item in the View menu reorderColumnsMenuItem Reorder Columns menu item in the View menu resizeColumnsMenuItem Resize Columns menu item in the Format menu wrapMenuItem Wrap menu item in the Format menu showAsTopMenuItem Show As Top menu item in the tree’s View menu 10-46 Web User Interface Developers Guide for Oracle Application Development Framework 3. Add your custom menus and toolbars to the component: ■ Menus: Add a menu component inside the menu facet. ■ Toolbars: Add a toolbar component inside the toolbar or secondaryToolbar facet. ■ Status items: Add items inside the statusbar facet. ■ View menu: Add commandMenuItem components to the viewMenu facet. For multiple items, use the group component as a container for the many commandMenuItem components. From the Component Palette, drag and drop the component into the facet. For example, drop Menu into the menu facet, then drop Menu Items into the same facet to build a menu list. For more instructions about menus and toolbars, see Chapter 14, Using Menus, Toolbars, and Toolboxes.

10.9 Exporting Data from Table, Tree, or Tree Table

You can export the data from a table, tree, or tree table, or from a table region of the DVT project Gantt chart to a Microsoft Excel spreadsheet. To allow users to export a table, you create an action source, such as a command button or command link, and add an exportCollectionActionListener component and associate it with the data you wish to export. You can configure the table so that all the rows will be exported, or so that only the rows selected by the user will be exported. For example, Figure 10–23 shows the table from the ADF Faces demo that includes a command button component that allows users to export the data to an Excel spreadsheet. scrollToFirstMenuItem Scroll To First menu item in the tree’s View menu scrollToLastMenuItem Scroll To Last menu item in the tree’s View menu freezeToolbarItem Freeze toolbar item detachToolbarItem Detach toolbar item wrapToolbarItem Wrap toolbar item showAsTopToolbarItem Show As Top toolbar item wrap Wrap menu and toolbar items freeze Freeze menu and toolbar items detach Detach menu and toolbar items Tip: You can also export data from a DVT pivot table. For more information, see Section 26.8, Exporting from a Pivot Table. Table 10–1 Cont. Valid Values for the featuresOff Attribute Value Will not display...