14.5 Controlling Navigation Using Branches

This section explains how to add a branch to an application. A branch is an instruction to link to a specific page, procedure, or URL after a given page is submitted. For example, you can branch from page 1 to page 2 after page 1 is submitted.

Topics:

14.5.1 Creating a Branch in Page Designer

To create a branch in Page Designer:

  1. View the page in Page Designer:
    1. On the Workspace home page, click the App Builder icon.
    2. Select an application.
    3. Select a page.
    Page Designer appears.
  2. In either the Rendering or Processing tab, right-click Branches and select Create Branch.

    The Property Editor displays the Branch attributes.

    Tip:

    The Messages tab displays a red or yellow badge to identify messages you need to address. Selecting a message displays the associated attribute in the Property Editor. You must address red error message before you can save.

    1. Identification, Name - Specify the name of the branch for easy identification by developers.
    2. Execution Options:
      1. Sequence - Specify the sequence for this component. The sequence determines the order of execution.

      2. Point - Select the point in the processing at which this branch action is considered. Options include:

        • After Submit (previously named Before Computation)

        • Validating (previously named Before Validation)

        • Processing (previously named Before Processing)

        • After Processing (previously named After Processing)

        • Before Header (previously named Before Header)

    3. Behavior, Type - Select a page branch type. To learn more, click the Help tab in the central pane.

      The attributes that display in the Property Editor depend on the branch type you select.

      If Type is Page or URL (Redirect), click Target and edit the attributes in the Link Builder Target dialog.

    4. Server-Side Condition:
      1. When Button Pressed - If you want this page processing component to execute only when the specified button is clicked, select a button from the list. You can incorporate this button condition with other conditions to further refine when this page processing component executes.

      2. Condition Type - Select a condition type from the list that must be met in order for this component to be rendered or processed. To learn more, click the Help tab in the central pane.

  3. To view all attributes in the Property Editor, click Show All .
  4. Edit the following Branch attributes:

    Tip:

    To learn more about an attribute, select the attribute in the Property Editor and click the Help tab in the central pane.

  5. Click Save.

14.5.2 Creating a Branch in Component View

You create a branch by running the Create Branch Wizard and specifying the branch point and branch type.

To create a branch:

  1. Navigate to the page. See "Viewing a Page in Legacy Component View".
  2. Under Branches, click the Create icon.

    The Create Branch Wizard appears.

  3. For Branch Attributes:
    1. Name - Specify the name of the branch for easy identification by developers.
    2. Sequence - Specify the sequence for this component. The sequence determines the order of evaluation.
    3. Branch Point - Select a branch point. Options include:
      • On Submit: Before Computation - Branching occurs before computations, validations, or processing. Use this option for buttons that should not invoke processing (for example, a Cancel button).

      • On Submit: Before Validation - Branching occurs after computations, but before validations or processing. 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 may want to branch based on the result of a computation (for example, to a previous branch point).

      • On Submit: Before Processing - Branching 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 - Branching 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 - Branching 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.

    4. Branch Type - Select a branch type. The most common branch type is Branch to Page or URL.
    5. Click Next.
  4. For Target, follow the on-screen instructions. The attributes that display depend upon the selected Branch Type. To learn more, see item Help.
  5. For Branch Conditions:
    1. When Button Pressed - To execute this branch only when the user clicks a specific button, select a button from the list. You can incorporate this button condition with other conditions to further refine when this branch executes.
    2. Condition Type - Select a condition type from the list that must be met in order for this component to be rendered or processed.
  6. Click Create Branch.

14.5.3 About Branching Conditionally

Like other controls, branches can be made conditional. To a branch conditional, view the branch attributes in the Property Editor. Under Server-side Condition, edit the appropriate attributes.