Application Express User's Guide > Adding Navigation > Controlling Navigation Usin...
Controlling Navigation Using Branches |
Previous |
Next |
A branch is an instruction to link to a specific page, procedure, or URL. For example, you can branch from page 1 to page 2 after page 1 is submitted.
Note: If a page has a select list and a submit button, it can submit itself. However, you must create a branch to call the page or the submit will fail. |
You create a new branch by running the Create Branch Wizard and specifying a the branch point and branch type. The branch type defines the type of branch you are creating.
To create a branch:
Navigate to the appropriate Page Definition:
On the Database Home Page, click the Application Builder icon.
Select an application.
Select a page.
The Page Definition appears.
Under Branches, click the Create icon.
Select a branch point:
On Submit: Before Computation - Occurs before computations, validations, or processing. Use this option for a Cancel button.
On Submit: Before Validation - Occurs after computations, but before validations or processing. Typically not used. If a validation fails, page processing stops, a rollback is issued, and the page displays the error. Because of this default behavior, you do not need to create branches to accommodate validations. However, you might want to branch based on the result of a computation (for example, to the previous branch point).
On Submit: Before Processing - Occurs after computations and validations, but before processing. Use this option to branch based on a validated session state, but before performing any page processing.
On Submit: After Processing - Occurs after computations, validations, and processing. This option branches to a URL or page after performing computations, validations, and processing. When using this option, remember to sequence your branches if you have multiple branches for a given branch point.
On Load: Before Header - Occurs before a page is rendered. This option displays another page, instead of the current page, or redirects the user to another URL or procedure.
Select a branch type.
Depending upon the branch type, specify the following types of information on the pages that follow:
The page ID of the page to which you want to branch
PL/SQL code
A URL address
Follow the on-screen instructions.