Home Programming Oracle APEX Cookbook

Oracle APEX Cookbook

By Michel van Zoest , Marcel van der Plas
books-svg-icon Book
Subscription FREE
eBook + Subscription €11.99
eBook €39.99
Print + eBook €48.99
READ FOR FREE Free Trial for 7 days. €11.99 p/m after trial. Cancel Anytime! BUY NOW BUY NOW BUY NOW
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook + Subscription?
Download this book in EPUB and PDF formats
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook?
Download this book in EPUB and PDF formats
Access this title in our online reader
DRM FREE - Read whenever, wherever and however you want
Online reader with customised display settings for better reading experience
What do you get with video?
Download this video in MP4 format
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with Audiobook?
Download a zip folder consisting of audio files (in MP3 Format) along with supplementary PDF
READ FOR FREE Free Trial for 7 days. €11.99 p/m after trial. Cancel Anytime! BUY NOW BUY NOW BUY NOW
Subscription FREE
eBook + Subscription €11.99
eBook €39.99
Print + eBook €48.99
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook + Subscription?
Download this book in EPUB and PDF formats
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook?
Download this book in EPUB and PDF formats
Access this title in our online reader
DRM FREE - Read whenever, wherever and however you want
Online reader with customised display settings for better reading experience
What do you get with video?
Download this video in MP4 format
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with Audiobook?
Download a zip folder consisting of audio files (in MP3 Format) along with supplementary PDF
  1. Free Chapter
    Creating a Basic APEX Application
About this book
Publication date:
October 2013
Publisher
Packt
Pages
444
ISBN
9781782179672

 

Chapter 1. Creating a Basic APEX Application

In this chapter we will cover the following topics:

  • Creating an APEX 4.0 application

  • Creating a simple form page

  • Creating a simple report page

  • Implementing an interactive report

  • Creating a chart

  • Creating a map chart

  • Creating a navigation bar

  • Creating a list of values

  • Including different item types

  • Protecting a page using an authorization scheme

  • Securing an application with Authentication

  • Controlling the display of regions and items with Dynamic Actions

  • Creating a computation

  • Creating an automated row fetch with a page process

  • Putting some validation in a form

  • Creating a report with PL/SQL Dynamic Content

 

Introduction


This chapter describes the basic steps to create an APEX application. Using APEX, it is really simple to create a basic application. The user interface is web-based and very intuitive. A lot of objects can be created using wizards which will guide you through the creation process.

Our aim is to make an intranet application where employees can get information. When starting the application, it shows a homepage with information such as weather, traffic company information, latest news, blogs, and so on. Employees can see their colleagues' profiles, just like in Facebook. Employees also have access to documents such as timesheets and project plans.

 

Creating an APEX 4.0 application


This recipe describes the tasks needed to create an APEX 4.0 application. You should have APEX 4.0 installed or have an account on Oracle's online APEX environment at http://apex.oracle.com and your web browser should be a modern browser like Microsoft Internet Explorer 7 or higher or Mozilla Firefox 1.0 or later. The starting point is the Oracle Application Express home page:

How to do it...

  1. Click on the Application Builder icon on the left-hand side of the screen.

    You will see a page where you can choose between database applications or websheet applications. Furthermore, you see already created applications.

  2. Click on the Create button on the right-hand side of the screen. Two options are shown. You can now choose between a database application and a websheet application. We select the database application.

    In APEX you have two ways of selecting and proceeding to the next step most of the time. Usually, there is an icon accompanied by a radio button. When you check the radio button, you must then click on the Next button to proceed. When you click on the icon, you automatically go to the next step. In this book, when there is the situation that you have to select one of the shown options, we will only tell which one of the options you should select. You can decide for yourself which way to select and proceed:

  3. Select Database.

  4. In the next step we can now choose between From Scratch, From Spreadsheet, and Demonstration Application. When you choose Demonstration Application, Oracle APEX creates an application which shows the possibilities of APEX. However, we want to create an application by ourselves, and we can install this demonstration application at a later time. For now, we select "From Scratch".

  5. Enter a name and an application ID . Preferably choose a name which covers the goal of the application. In our case, we call the application Intranet.

  6. Application ID is a generated and unique identification number, but you can also use some other number for your convenience.

  7. At the Create Application radio group, leave this option to From Scratch.

  8. Finally, select the schema where the tables that you want to use for your application will reside and click on Next.

    The next step in the wizard is selecting pages. You can start with a blank page and, from that starting point, extend your APEX application. You can also choose to add reports and forms beforehand. At this point you don't actually define the content of the pages, you just create the "skeleton" of them.

  9. We choose to add one blank page and proceed to the next step.

  10. Now you can choose to include tabs in your application. Tabs are components that help you navigate through the application. For now, we are not going to use tabs, so select No Tabs.

The next step is the option to copy shared components from another application. Shared components are objects that can be used throughout the application, for example, a list of values or images. Because we create a simple application from scratch, we don't want to copy shared components from another application. Select No.

An authentication scheme is a means of allowing users access to our application. APEX offers different methods for this. More will be explained in another recipe. The scheme for this application will be selected in the next step.

  1. Select the standard Application Express authentication scheme.

  2. You can select the language used in your application, as well as where the user language should be derived from.

  3. The last option in this step is the date format mask. Click on the LOV button next to the text item to get a list with possible date format masks and select one.

  4. The last step in the wizard is the theme. Theme 1 and Theme 2 are basic themes. If you don't like all those colors, just select something like Theme 18. That is quite a simple theme.

  5. We select Theme 1 and that completes the Create Page wizard.

Now that we have completed the wizard, we can click on the Create button to confirm. The application will be created and we will see a number of pages, depending on how many pages we already created in step 6.

Tip

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you

Depending on the type of authentication, we will also see page 101—Login. This is the default page APEX navigates to when you run an application using authentication. It is generated automatically with all functionalities to allow users to log in to our application.

Click on the large Run Application button to go to the login page.

We can log in on this page with the same credentials we use to gain access to the APEX development environment. So enter this username and password and click on the Login button.

Well, that's it! We've created and run our first Oracle APEX 4.0 application. We can now click on the pages to define them, or we can add new pages to extend our application. We can also click on the Run Application icon to see what has actually been created. Since we only included an empty page, we will see something like this—an empty application except for a single, also empty page:

How it works...

We have just created our first application. Even though it's just an empty shell, this is the starting point for all APEX applications. Creating content for our application is a whole different story and will be explained in the following recipes.

                             
About the Authors
  • Michel van Zoest

    Michel van Zoest is a consultant with years of experience in building web applications using Oracle technologies such as Oracle Web Forms, Oracle Designer, MOD_PLSQL, ADF, SOA Suite, and of course, APEX. He is one of the first Oracle Application Express Developer Certified Experts in the world. He has used his APEX knowledge in projects for companies ranging in size from a single employee to large multinationals. His experience in these projects has been used in the realization of this book. Michel currently works at Whitehorses in the Netherlands and runs his own blog at http://www.aboutapex.com. He also blogs at the company website on http://blog.whitehorses.nl and he regularly writes White book articles (in Dutch) for Whitehorses. You can reach Michel on Twitter at @mvzoest or e-mail him at michel@aboutapex.com.

    Browse publications by this author
  • Marcel van der Plas

    Marcel van der Plas was born in 1969 in Eindhoven and still lives there. He has been an Oracle Consultant for over 15 years. Marcel has worked on many projects with Oracle Designer, Oracle Forms, and Oracle Reports. Later on, he became interested in APEX and did some projects with APEX. Marcel has been working on an APEX project for an electronics company for over 2 years. Marcel currently works for Ciber. Other companies he worked for are Atos Origin and Whitehorses. For Whitehorses, he wrote some articles (White books) about Oracle. Marcel wrote the Oracle APEX 4.0 Cookbook, Packt Publishing, with Michel van Zoest. You can find APEX blogposts from Marcel at http://orclapex.blogspot.com. Besides that, you can follow Marcel on Twitter (@whmvdp).

    Browse publications by this author
Latest Reviews (1 reviews total)
The content was just great. However, some of the chapters need a lot more detail.
Oracle APEX Cookbook
Unlock this book and the full library FREE for 7 days
Start now