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?


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.




Download the sample application:

Oracle ADF 12c Documentation