3.3 How Does Page Processing and Page Rendering Work?
Learn how the Oracle APEX engine renders and processes pages, when APEX issues implicit commits, how conditional rendering and processing works, and how to verify user identity or control access to controls and components.
- How the APEX Engine Renders and Processes Pages
- About Implicit Commit Points
- Understanding Conditional Rendering and Processing
- About Verifying User Identity
- About Controlling Access to Controls and Components
Parent topic: App Builder Concepts
3.3.1 How the APEX Engine Renders and Processes Pages
The Oracle APEX engine dynamically renders and processes pages based on data stored in Oracle database tables. To view a rendered version of your application, you request it from the APEX engine with a URL. When you run an application, the APEX engine relies on two processes:
-
Show Page - Show Page is a page rendering process that assembles all the page attributes (including regions, items, and buttons) into a viewable HTML page. When you request a page using a URL, the engine is running Show Page.
-
Accept Page - Accept Page performs forms page processing, including computations, validations, processes, and branching. When you submit a page, the APEX engine is running Accept Page or performing page processing during which it saves the submitted values in the session cache and then performs any computations, validations, or processes.
Parent topic: How Does Page Processing and Page Rendering Work?
3.3.2 About Implicit Commit Points
Oracle APEX issues implicit commits at the following points:
- On load, after a page finishes rendering
- On submit, before branching to another page
- On submit, if one or more validations fail, before re-rendering the page
- After a computation
- After changing the value of an item, for example after a PL/SQL process that modifies a bind variable value or when
APEX_UTIL.SET_SESSION_STATE
is called. - When
APEX_MAIL.PUSH_QUEUE
is called
See Also:
SET_SESSION_STATE Procedure and PUSH_QUEUE Procedure in Oracle APEX API Reference
Parent topic: How Does Page Processing and Page Rendering Work?
3.3.3 Understanding Conditional Rendering and Processing
Developers can use conditions in an application to control how pages and page components display and when processes, computations, and validations execute.
- What is a Condition?
- Selecting a Condition
- Condition Example: Current Page in Expression 1
- Condition Example: Exists
- Condition Example: PL/SQL Expression
Parent topic: How Does Page Processing and Page Rendering Work?
3.3.3.1 What is a Condition?
A condition is a small unit of logic that helps you control the display of regions, items, buttons, and tabs and the execution of processes, computations, and validations. For example, when you apply a condition to a button, the rendering engine evaluates the condition during the rendering (or Show Page) process. Whether the condition passes or fails determines if the button displays.
See Also:
Available Conditions for a detailed listing of available condition types
Parent topic: Understanding Conditional Rendering and Processing
3.3.3.2 Selecting a Condition
You specify a condition by selecting a condition type. You can select a condition type when you first create the control or component, or later when editing the control or component.
Depending upon the type of condition you select, you enter the appropriate values in the fields provided. The condition evaluates to true or false based on the values you enter. Click the select list to view a complete list of all available conditions for a given component or control.
Parent topic: Understanding Conditional Rendering and Processing
3.3.3.3 Condition Example: Current Page in Expression 1
Current page in Expression 1 evaluates to true if the current page number is contained within the comma-delimited list of pages provided. For example:
3,100,203
If the current page is 100, then this condition evaluates to true and the condition passes.
Parent topic: Understanding Conditional Rendering and Processing
3.3.3.4 Condition Example: Exists
Exists (SQL query returns at least one row) is expressed as a SQL query. If the query returns at least one row, then the condition evaluates as true. For example:
SELECT 1 FROM employees WHERE department_id = :P101_DEPTNO
This example references item P101_DEPTNO
as a bind variable. You can use bind variables within application processes and SQL query regions to reference items from session state. If one or more employees are in the department identified by the value of P101_DEPTNO
, then the condition evaluates as true.
3.3.3.5 Condition Example: PL/SQL Expression
Use PL/SQL Expression to specify an expression in valid PL/SQL syntax that evaluates to true or false. For example:
NVL(:MY_ITEM,'NO') = 'YES'
If the value of :MY_ITEM
is YES, as in the previous example, then the condition evaluates as true. If the value of :MY_ITEM is anything other than YES, then the condition evaluates as false.
Parent topic: Understanding Conditional Rendering and Processing
3.3.4 About Verifying User Identity
Authentication is the process of establishing users' identities before they can access an application. Authentication may require a user to enter a user name and password, or may involve the use of a digital certificate or a secure key.
Oracle APEX supports modular authentication, making it easy to switch authentication methods when needed. You can establish a user's identity by selecting from several built-in authentication methods, or by using a wizard to create your own custom authentication approach.
Parent topic: How Does Page Processing and Page Rendering Work?
3.3.5 About Controlling Access to Controls and Components
While conditions control the rendering and processing of specific controls or components on a page, authorization schemes control user access. Authorization is a broad term for controlling access to resources based on user privileges.
Authorization schemes use the identities established by authentication to grant privileges on applications and objects within them. You can specify an authorization scheme for an entire application, a page, or a specific page control such as a region, item, or button. For example, you could use an authorization scheme to selectively determine which tabs, regions, or navigation bar entries a user sees.
See Also:
Parent topic: How Does Page Processing and Page Rendering Work?