How To Create Search and Results on the Same Page
1> To create a page that has both a search form and results table on the same page, you follow the procedures for when they are on separate pages, except you must create a separate iterator for the results table.
2> To create a search form and results table on the same page:
3> From the Data Control Palette, drag a collection and from the context menu, select Forms > ADF Search Form.
For example, if you want the query to execute over all service requests, you would drag the ServiceRequests collection.
4> Drag the same collection, but this time drop it as any type of table.
5> Open the associated page definition file.
6> In the Structure Pane, right-click on the Executables node and choose Insert inside executables > invokeAction.
7> In the Insert invokeAction dialog, enter an ID for the action, such as AlwaysFind. From the Binds drop-down list, select Find. Do NOT click OK or close the dialog.
8> In the Insert invokeAction dialog, select the Advanced Properties tab.
9> For RefreshCondition, enter the following EL expression, which tells the application to invoke this action whenever the page is not in Find mode. Replace <iterator> with the name of the iterator:
${bindings.<iterator>.findMode == false}
Note:
The invokeAction must appear before the iterator, so that it is executed first.
10> In the Structure Pane, right-click on the Executables node and choose Insert inside executables > iterator.
11> Select the same collection used for the search form, and in the Iterator ID field enter a more meaningful name, such as ResultsIterator and click OK.
12> In the Structure Pane, expand the bindings node, right-click on the binding for the results table, and choose Properties.
13> In the Table Binding Editor dialog, make sure the correct collection is selected in the Data Collection column.
14> Select the newly created iterator from the Iterator drop-down list, ensure that all correct attributes are in the Display Attributes column, and click OK.
15> In the JSF page, delete the Find button.
16> Doing this only deletes the component from the JSF page. The binding still exists in the page definition file.