ADF: Using the Target Tag

When you have a form with a required field, along with a Submit button and a Cancel button, when the Cancel button is clicked, all fields in the form are processed. Because the input text field is required, it will fail validation. To avoid the validation, probably you will configure the Cancel button to be immediate, and when the user clicks the Cancel button, all validation is skipped, any entered data is not updated to the model, and the user navigates as expected.

It works, but what will you do when you have, for example, another Submit button in the same form?

adf-using-the-target-tag1

You may use the Target Tag (<af:target>). This way, you can state which targets you want executed and rendered when a specific event is fired by the component.

adf-using-the-target-tag2

adf-using-the-target-tag3

adf-using-the-target-tag4

Download the sample application: ADFTargetApp.zip.

Reference:
Oracle ADF 12c Documentation

Waslley Souza

Author: Waslley Souza

Consultor Oracle com foco em tecnologias Oracle Fusion Middleware e SOA. Certificado Oracle WebCenter Portal, Oracle ADF e Java.

Leave a Reply

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