ADF Table Row Selection Event Update Form

One of the UI requirements in a recent ADF project was to use an ADF Read-Only Table and its built-in functionality (row selection, filtering and sorting) to allow a user to find a row, select it, then automatically have a form on the same page be updated with the data from the row selected for updating and saving. Let’s run though how to implement this…

1. Build the ADF Read-Only table by dragging the appropriate data control onto the view. Ensure you enable the appropriate ADF behaviors on the Edit Table Columns screen. Row Selection is required, but Filtering & Sorting is optional depending on your needs.

2. Build your ADF Form using the same data control. Ensure your using the same Iterator as the table.
Table Form 02

a. Bind your button to the appropriate ADF control to update the DB. For example if you’re using EJB 3.0/JPA then you should have a mergeObject data control that will save updates to object to the DB. In the Edit Action Binding screen make sure to use the same Iterator in your EL expression for the value of the action binding as your Table and form components.

Table Form 03

b. Select the ADF container that contains your form components (for example af:panelFormLayout), and change its Behavior -> PartialTrigger property to the id of your table. This causes your form container to listen for any events that get fired from your table, and thus will refresh the form with the iterator’s currentRow (when the selection event get fired from the table).

Table Form 04

3. Run the application and test, without any additional work, it should look something like……

Table Form 05

One Comment on “ADF Table Row Selection Event Update Form”

  1. nice, but i had problem. please guide me.
    oracle.jbo.NoDefException: JBO-25002: Definition setup1.view.pageDefs.untitled3PageDef of type Form Binding Definition is not found.

    what to do?

Leave a Reply

Your email address will not be published. Required fields are marked *