📜 ⬆️ ⬇️

Oracle Application Express. Applications and Pages

Continuation of the tutorial.


This section describes how to create an Oracle APEX application and create pages in an application.


Previous part: Oracle Application Express Tutorial. IDE Overview


Table of contents


Creating an application
Default pages
Application launch
Creating pages
Main components of pages
Visual elements
Non-visual elements
Basic properties of elements
General properties
Page properties


Creating an application


To create an application, you need to go into App Builder and click the "Create" button.


Background information on application types

In the previous versions of the apex, in the first step, the wizard suggested choosing the type of application (in versions 4.x, if memory serves me, these were the types of "Database application" and "Websheet Application", in versions 5.x - "Desktop", "Mobile "," Websheet "and" Packaged Application "), in the current version all the other types were pushed a little to the side (although" Websheet "remained), and you just need to select" New Application ". And "Packaged Application" are those demo applications from App Gallery .


Next, the application creation wizard will start. In the first step, you need to select "New Application", on the second - just fill in the "Name" and "Application ID" fields (application number). The name is needed simply because it is a required field, and the Application ID is because it will not be possible to change it later. More precisely, it is possible (through export / import), but it is long and tedious, it is better to immediately set the desired number if the automatically generated apex does not suit you. The number must be unique. This number is used as part of the application address. Look at the typical apex URL:


 https://apex.oracle.com/pls/apex/f?p=123456:1:14675052744498::::: 

Here 123456 is the application ID.


You can ignore the remaining fields in the wizard for now, all these settings can be changed later.


After that, you need to click "Create Application", the apex will create the application and automatically take you to the application page, where you will see.


Default pages


By default, the apex will create 3 pages in the application. Pages, as well as applications, have a number and title. The number is also used in the URL to identify the page, it immediately follows the application number and is separated from it by a colon. That is, the format is:


 https://apex.oracle.com/pls/apex/f?p=APPLICATION_ID:PAGE_ID:<  url> 

Default pages are:



Applications and pages also have the useful property of Alias . For an application, this property is configured in the application properties ("Application Properties" - "Definition" - "Name" - "Application Alias"), and for the page - in the page editor in the properties panel to the right. Alias can be used in the URL of the page instead of the number. The default login page is created with the LOGIN_DESKTOP LOGIN_DESKTOP , and the home page is created with the HOME alias. If you set the application alias MY_APP , then the login page can be accessed at


 https://apex.oracle.com/pls/apex/f?p=MY_APP:LOGIN_DESKTOP 

#define true false (or I know what you were thinking about)

What will happen if application 123 is made alias 456, and application 456 is alias 123? Nothing will happen, the apex will not allow such aliases to be made to applications. This is not spelled out clearly in the help, but the application alias seems to be subject to the rules for identifier names in PL / SQL.
What will happen if page 123 is made alias 456, and page 456 is alias 123? Nothing will happen, such aliases can be given to the pages, but they will be ignored. 123 in the url will open the page with the number 123.


Application launch


Now that the application has been created, it can already be “launched” (only there is nothing to look at for now). This is not exactly the same as running a normal application (as in Windows or Linux). The apex application is rendered with the same engine as the IDE itself, so once you have created the application, it is instantly ready for use, and any person who enters his address in the address bar can work with it. The actual launch of the application, in fact, is just such a name for opening the start page (the one with the number 1). You can run the application in many ways:



page launch


These two buttons are in almost any section of the IDE. The left contains the number of the last page that you opened in the page editor. Clicking on it will take you to editing this page, and clicking on the right button will launch this page.


What happens after launch? If the page being launched has limited access, the user will first be redirected to the login page. If the user is already logged in, or the settings page is designated as public, this page will open.
By default, the page is created with limited access. There are two possible settings in the page properties (Page editor - right panel - property group "Security" - "Authentication"):



Creating pages


You can create a page on the application page . Click "Create", then the page creation wizard will start. Wizard Steps:


  1. Selecting a page type from (at the moment) 12 types, some of which also have subtypes (if they exist, they will appear in the next step). The first type from the list is "Blank page", that is, a blank page without everything. The remaining types are common variants of the pages for working with the database: reports, input forms, graphics, etc. Here I will describe the process of creating a blank page, and the other types will be a separate article.
  2. Enter the page number and name. I spoke about numbers above; the number is set at this step and then it will not be possible to change it, so look carefully. Sometimes developers break pages into groups (by function, for example), and reserve a range of numbers for each group, so if you use this in a project, be careful. Immediately you need to select the type of page: normal, modal dialogue, modeless dialogue.
  3. Customize navigation items. You can skip (click "Next") and set up later (although if you have some kind of navigation system already built, it’s convenient to set everything up at this step right away and no longer take a steam bath).
  4. Confirmation of creation.

After this page is created and ready to use.


Main components of pages


Visual elements


Visual elements are elements that are somehow displayed on the screen. It:



Reports and graphs can be viewed as variations of regions (technically, they are), but they are rather independent entities with their own behavior, properties, and so on.


Non-visual elements


These are elements to ensure the logic of the application. There is actually a huge variety of elements, although the user literally can not see them. Basic types:



Basic properties of elements


General properties


The basic properties characteristic of each (or almost every) type of elements. They can be viewed and modified in the page editor, where they are grouped together. Here I will briefly describe their purpose (so that you will know what to look for), and I will tell you in more detail in other articles.



Page properties


Properties specific to pages:



')

Source: https://habr.com/ru/post/446036/


All Articles