Sunteți pe pagina 1din 19

• APEX Defined

• Major Components
• Getting Started (Terminology and Details)
• Building applications with APEX
• APEX Security
• How to access EBS tables in APEX
• APEX Application Items.
• Few Sample Applications from my Project
• Informative Sites/Links.

© 2012 FCS a TEKsystems Global Services® Division – Confidential


What is APEX?
• Formerly called HTML-DB, a web-based RAD
tool which resides in Oracle database.
• Using browser based user interface and
limited programming experience, you can
build a complete data-centric web
application in a very fast development cycle
• Leverages full Oracle d/b capabilities and
existing SQL & PL/SQL skills.
• Fully supported, “no-cost” option with
Oracle Database.
Easy to Develop…Easy to Deploy…Easy to Manage

© 2012 FCS a TEKsystems Global Services® Division – Confidential


Major Components

• Administration

• SQL Workshop

• Application Builder

© 2012 FCS a TEKsystems Global Services® Division – Confidential


Major Components

• SQL Workshop • Application Builder


• Interact with your • Centerpiece of APEX
database as with • Loaded with wizards
SQL*Plus, but visual • Reports, forms and charts
• Data dictionary and • Connect pages using
object browsing, query branches
by example
• 75 pre-defined widgets
• Administration • Basic HTML, pop-up lists,
• Manage users calendars, etc.
• Manage services • Full data entry validation
• Monitor activity

© 2012 FCS a TEKsystems Global Services® Division – Confidential


Getting Started
• Apply for a free account at apex.oracle.com
• Obtain a workspace: A workspace is a logical work
area which is associated with one or more Oracle
database schemas.
• Create Application: It is a collection of pages and
branches connecting them.
• Pages: Each page definition represents an HTML page
that will be displayed to the application’s users.
• Region: Content is displayed in regions, which are
logical subsections of a page.
• Item: An item can be a text field, text area, password,
select list, check box, and so on

© 2012 FCS a TEKsystems Global Services® Division – Confidential


Getting Started (Details)
• Applications
A workspace can contain one or more Applications. An application is
comprised of a set of pages and a number of shared components which
may be used by one or more of the pages. These Applications are basically
we call – APEX Forms.

• Pages
The definition of a page comprises three main areas:
• Page Rendering
• Page Processing
• Shared Components

© 2012 FCS a TEKsystems Global Services® Division – Confidential


Pages
A page is the basic building block of an application. When you build an
application in Application Builder, you create pages that contain user
interface elements, such as tabs, lists, buttons, items, and regions.

© 2012 FCS a TEKsystems Global Services® Division – Confidential


Regions

Content is displayed in regions, which are logical subsections


of a page. Each page can have any number of regions of
several different types. These types include: HTML text, SQL
Queries, PL/SQL-generated HTML, and charts. Each region is
rendered using a region template. Regions are positioned on
the page using display points defined in the page template.

The region defines the location and appearance of items


and buttons on the page. You can add a new region to an
existing page.

© 2012 FCS a TEKsystems Global Services® Division – Confidential


Items and Validations/Computations/Processes

• Items are basic building blocks of a page. They are variety of item
types to choose from such as check box, text box, radio button, display
item, hidden item, etc.
• You can modify existing items, or create new items from the Page
Rendering section of the Page Definition screen.
• Computations and Processes can have PL/SQL block for assigning values
to items in the page. You can also specify at what point the logic
should be executed like On Page Load, Before header. These are like
triggers in Forms 6i.
• Page validations allow the contents of a page to be checked against a
set of business rules before the page is submitted.
• Validation can be defined at page level, or can be associated with a
particular item.

© 2012 FCS a TEKsystems Global Services® Division – Confidential


Gist of Discussion so far

© 2012 FCS a TEKsystems Global Services® Division – Confidential


Sample Applications
• Get started with the sample application provided with APEX.
• Create your own (basic) application.

© 2012 FCS a TEKsystems Global Services® Division – Confidential


Websheet Applications
• Websheet applications are interactive Web pages that combine
text with data.
• Websheets can contain multiple pages. Many Websheets include
dynamically generated navigation sections. Each navigation
section includes a hierarchical tree that enables you to navigate
between pages or page sections.
• You create a Websheet application by running the Create
Application wizard. After you create a Websheet page, you add
content either as text or data.

© 2012 FCS a TEKsystems Global Services® Division – Confidential


How to access EBS Tables in APEX

 Please note free APEX hosting site (apex.oracle.com) can not be


used to connect to your servers.
 Is APEX installed on the same database server as Oracle EBS?
 Grant Privileges on the Table to APEX Schema
 Is APEX installed on different database server say
Reporting/Business Intelligence (BI) database which is clone of
Oracle EBS database?
 Create a database link in APEX database to EBS database. Once
database link is created, you can refer to a table or view on the other
database by appending @dblink to the table or view name.
CREATE PUBLIC DATABASE LINK <dblink Name>
CONNECT TO < APEX Schema>
IDENTIFIED BY <PWD>
USING <EBS database server>;
 Once database link is created, you can refer to a table or view on the
other database by appending @dblink to the table or view name.
 Grant Privileges on the Table to APEX Schema

© 2012 FCS a TEKsystems Global Services® Division – Confidential


APEX Application Security
 Oracle Application Express (APEX) has many built in security features
like Authentication, Authorization i.e. access level of the user, session
state protection etc.
 APEX Authentication Schemes are created/managed in Shared
Components > Authenication Schemes
 APEX comes with Preconfigured authentication schemes. Either you
can use them OR you can create custom authentication scheme from
scratch.

© 2012 FCS a TEKsystems Global Services® Division – Confidential


Application Items
 Page Items: Page items are placed on a page and have associated user
interface properties, such as Display As, Label and Label Template.
 Application Items: Application items are not associated with a page
and therefore have no user interface properties. You can use an
application item as a global variable.
 Navigation: Application Id  Shared Components  Application Items

© 2012 FCS a TEKsystems Global Services® Division – Confidential


Deploying APEX Application from one instance to another

 Exporting an APEX Application


 Importing an APEX Application
Deploying of an APEX application could be done
either through front end (APEX) or through SQL
command line.

© 2012 FCS a TEKsystems Global Services® Division – Confidential


Advanced Feature of APEX (Collections)
 Collections enable you to temporarily capture one or more nonscalar
values. You can use collections to store rows and columns currently in
session state so they can be accessed, manipulated, or processed during a
user's specific session. You can think of a collection as a bucket in which
you temporarily store and name rows of information.
 Every collection contains a named list of data elements (or members) which
can have up to 50 character attributes (VARCHAR2(4000)), five number
attributes, five date attributes, one XML Type attribute, one large binary
attribute (BLOB), and one large character attribute (CLOB). You insert,
update, and delete collection information using the PL/SQL API
APEX_COLLECTION.
 When you create a collection, you must give it a name that cannot exceed
255 characters. Note that collection names are not case-sensitive and will
be converted to uppercase.
 Once the collection is named, you can access the values in the collection by
running a SQL query against the view APEX_COLLECTIONS.

© 2012 FCS a TEKsystems Global Services® Division – Confidential


APEX Collections Contd…
 Creating a Collection: The following methods could be used to create a
collection

 CREATE_COLLECTION: This method creates an empty collection with the


provided name. An exception is raised if the named collection exists.

 CREATE_OR_TRUNCATE_COLLECTION: If the provided named collection does not


exist, this method creates an empty collection with the given name. If the
named collection exists, this method truncates it. Truncating a collection
empties it, but leaves it in place.

 CREATE_COLLECTION_FROM_QUERY: This method creates a collection and then


populates it with the results of a specified query. An exception is raised if the
named collection exists. This method can be used with a query with up to 50
columns in the SELECT clause. These columns in the SELECT clause will populate
the 50 character attributes of the collection (C001 through C050).

 Accessing a Collection : You can access the members of a collection by


querying the database view APEX_COLLECTIONS. The APEX_COLLECTIONS
view has the following definition:

© 2012 FCS a TEKsystems Global Services® Division – Confidential


APEX Collections Contd…
COLLECTION_NAME NOT NULL VARCHAR2(255)
SEQ_ID NOT NULL NUMBER
C001 VARCHAR2(4000)
C002 VARCHAR2(4000)
C003 VARCHAR2(4000)
C004 VARCHAR2(4000)
C005 VARCHAR2(4000) ...................
C050 VARCHAR2(4000)
N001 NUMBER
N002 NUMBER
N003 NUMBER
N004 NUMBER
N005 NUMBER
CLOB001 CLOB
BLOB001 BLOB
XMLTYPE001 XMLTYPE
MD5_ORIGINAL VARCHAR2(4000) ;

SELECT c001, c002, c003, n001, clob001 FROM APEX_collections WHERE collection_name =
<Collection Name>

© 2012 FCS a TEKsystems Global Services® Division – Confidential