KEMBAR78
Oracle APEX Tutorial, Tabular Form | PDF | Spring Framework | Eclipse (Software)
0% found this document useful (0 votes)
54 views69 pages

Oracle APEX Tutorial, Tabular Form

Oracle APEX Tutorial, Tabular Form

Uploaded by

ahosainy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views69 pages

Oracle APEX Tutorial, Tabular Form

Oracle APEX Tutorial, Tabular Form

Uploaded by

ahosainy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 69

o7planning

Oracle APEX Tutorial, Tabular Form

1- Introduction
2- Create a Tabular Form using Wizard
3- Create Tabular Form manually
4- Handling Tabular form

4.1- Add rows


4.2- Multiple row update
4.3- Deleting multiple rows immediately
4.4- Deleting multiple rows - Prompt before deleting

1- Introduction ▴
You are viewing guidelines for programming Oracle APEX 5.0. This is the 2nd document which next of:

Oracle APEX Tutorial for Beginners

Included in this document, I will continue to guide you on Oracle APEX Database Desktop Application, using
Tabular Form.

2- Create a Tabular Form using Wizard ▴


Log in to Oracle APEX with programmer's account.
http://localhost:8080/apex

Go to "Database Application".
Next, going to "Hello Database Desktop Application" that you created in the previous guidance
In this application, there are a few pages created in the previous tutorial. Click "Create Page" to create another page.
Create a Tabular Form:
Enter:

Page: 7
Page Name: Emp Tabular Form (7)
Your web page has been created, click RUN to test the newly created page.
Page 7 is running:
Here, the question arises as to how to change some input fields into SELECT LIST or POPUP LOV (List of values). For
example, you want to choose a Manager (MGR) through POPUP LOV, and select a Job through SELECT LIST.
Return to the design screen of page 7. Set the properties for the JOB column so that it displays as a SELECT LIST.
Identification:

Type: Select List

List of Values

Type: Static Value


Static Value:

1 STATIC: ?
2 CLERK;CLERK,
3 SALESMAN;SALESMAN,
4 PRESIDENT;PRESIDENT,
5 MANAGER;MANAGER,
6 ANALYST;ANALYST

The syntax used to declare the static values

1 STATIC:Display1;Return1,Display2;Return2 ?
Next, you need to set the properties for the MGR so that it shows up as POPUP LOV (list of values)
Identification:

Type: Popup LOV (shows display values)

List of Values:

Type: SQL Query


SQL Query: Select emp.ename, emp.empno from Emp
Similarly set the properties for DEPTNO, so that it displays as a POPUP LOV.
Identification:

Type: Popup LOV (shows display values)

List of Values

Type: SQL Query


SQL Query: Select d.dname, d.deptno from Dept d
Save and run the Page 7:
3- Create Tabular Form manually ▴
Above, I showed you how to create a Tabular Form by using the wizard of Oracle Apex. Next we will create completely
from scratch a Tabular Form, not using the wizard, which will help you understand more about Tabular Form & Oracle
APEX.
Enter:

Page Number: 8
Name: Emp Tabular Form (8)
A blank page has been created.
Create a Tabular Form in the "Content Body" region:
Title: Emp Tabular Form (8)
Type: Tabular Form
SQL Query:

1 select EMPNO, ?
2 EMPNO EMPNO_DISPLAY,
3 ENAME,
4 JOB,
5 MGR,
6 HIREDATE,
7 SAL,
8 COMM,
9 DEPTNO
10 from EMP
You can test page 8, result is as follows:
Add a column contains Checkbox, which used to select rows.
Set attributes for EMPNO, hide this column, and set the primary key attribute for it.
Identification

Column Name: EMPNO


Type: Hidden Column (saves state)

Primary Key Source

Type: Existing sequence


Name: EMP_SEQ
Column ENAME:
Identification

Column Name: ENAME


Type: Text Field
Column JOB:
Identification

Column Name: JOB


Type: Select List

List of Values

Type: Static Values


Static Values:

1 STATIC: ?
2 CLERK;CLERK,
3 SALESMAN;SALESMAN,
4 PRESIDENT;PRESIDENT,
5 MANAGER;MANAGER,
6 ANALYST;ANALYST

Column MGR:
Identification

Column Name: MGR


Type: Popup LOV (shows display values)

List of Values

Type: SQL Query


Static Values: Select emp.ename, emp.empno from Emp
Column HIREDATE:
Identification

Column Name: HIDEDATE


Type: Date Picker

Appearance

Format Mask: YYYY-MM-DD

Default

Type: PL/SQL Expression


PL/SQL Expression: sysdate
Column SAL:
Identification

Column Name: SAL


Type: Text Field
SAL (Salary) Column is a type of numeric, so you need to add validation:
Identification

Name: SAL must be numeric

Validation:

Type: Column is numeric


Column: SAL

Error

Error Message: #COLUMN_HEADER# must have a value.


Display Location: Inline with Field and in Notification

Note :

#COLUMN_HEADER# is one that acts as a Place Holder, it will be replaced by the title of the corresponding
column at runtime.
Column COMM:
Identification

Column Name: COMM


Type: Text Field
Create validation for COMM, COMM must be numeric.
Identification

Name: COMM must be numeric

Validation:

Type: Column is numeric


Column: COMM

Error

Error Message: #COLUMN_HEADER# must have a value.


Display Location: Inline with Field and in Notification
Column DEPTNO:
Identification:

Type: Popup LOV (shows display values)

List of Values

Type: SQL Query


SQL Query: Select d.dname, d.deptno from Dept d
4- Handling Tabular form ▴
Next we need to add more processing includes create row, edit rows, delete rows
Change name of the buttons, as shown below:
For Cancel button:
When the user clicks the Cancel button, website will refresh the current page (Here is page 8).
4.1- Add rows ▴

When users click on the ADD button, table on page will automatically add a new row, which allows user to enter data.
You need to call javascript function to accomplish this.
Idetification

Button Name: ADD


Label: Add

Behavior

Action: Redirect to URL


Target: javascript:apex.widget.tabular.addRow();
4.2- Multiple row update ▴

Idetification

Button Name: SAVE


Label: Save

Behavior

Action: Submit Page


SAVE button need to save the information of several records at once, including new records, modified records. You
need to declare a process to handle this. This process will be run once immediately after the page is called, it will
update the records that have changes and insert new records.
Create Process:
Idetification

Name: ApplyMRU
Type: Tabular Form - Multi Row Update

Settings

Table Name: EMP


Primary Key Column: EMPNO

Execution Options

Tabular Form: Emp Tabular Form (8)


Run Process: Once Per Page Visit (default)

Success Messages

Success Message: #MRU_COUNT# row(s) updated, #MRI_COUNT# row(s) inserted.

Condition

When Button Pressed: SAVE (Name of button)


Execution Scope: For Created and Modified Rows
4.3- Deleting multiple rows immediately ▴

Handling button to immediately delete the selected records, no need to confirm:


To delete many rows you need to create a Process to handle this. This process will be executed once as soon as the
page is called.
Create Process:

Idetification
Name: ApplyMRD_IMMEDIATELY
Type: Tabular Form - Multi Row Delete

Settings

Table Name: EMP


Primary Key Column: EMPNO

Execution Options

Tabular Form: Emp Tabular Form (8)


Run Process: Once Per Page Visit (default)

Success Messages

Success Message: #MRD_COUNT# row(s) deleted.

Condition

When Button Pressed: IMMEDIATELY_MULTY_ROW_DELETE (Name of button)


Execution Scope: For Created and Modified Rows
4.4- Deleting multiple rows - Prompt before deleting ▴

Before deleting records, the program asks whether the user agrees to delete or not?
Idetification

Button Name: MULTI_ROW_DELETE


Label: Multi Row Delete

Behavior

Action: Redirect URL


Target: javascript:apex.confirm('Are you sure to delete?','MULTI_ROW_DELETE');
1 // The function includes 2 parameters, message and Button Name. ?
2
3 apex.confirm('Message ...', 'Button Name');
4
5 // Example:
6
7 apex.confirm('Are you sure to delete?','MULTI_ROW_DELETE');
8
9 // Using variable.
10 // htmldb_delete_message is a javascript variable
11 // with value: 'Would you like to perform this delete action?'
12 // (You need to declare this variable).
13 apex.confirm(htmldb_delete_message,'MULTI_ROW_DELETE');
1 // Declare a variable named htmldb_delete_message ?
2 var htmldb_delete_message='Would you like to perform this delete action?';
3
4 // Or:
5 // "DELETE_CONFIRM_MSG" is a constant available in APEX.
6 // It has value: Would you like to delete this thực action?
7
8
9 var htmldb_delete_message='"DELETE_CONFIRM_MSG"';
10
11
12 // Then can use this variable in the whole page.
13
14 apex.confirm(htmldb_delete_message,'MULTI_ROW_DELETE');

To delete many rows you need to create a Process to handle this. This process will be executed once as soon as the
page is called.
Idetification
Name: ApplyMRD
Type: Tabular Form - Multi Row Delete

Settings

Table Name: EMP


Primary Key Column: EMPNO

Execution Options

Tabular Form: Emp Tabular Form (8)


Run Process: Once Per Page Visit (default)

Success Messages

Success Message: #MRD_COUNT# row(s) deleted.

Condition

Execution Scope: For Created and Modified Rows


Type: Request = Value
Value: MULTI_ROW_DELETE
Execute Condition: Once
Related Document Categories

Oracle Technology

Java Basic

What is needed to get started with Java?


Guide to Installing and Configuring Java
Guide to Installing and Configuring Eclipse
Quick Learning Java for beginners
JDK Javadoc in CHM format
Inheritance and polymorphism in Java
Access modifiers in Java
Java Enum Tutorial
Java Annotation Tutorial
Comparison and sorting in Java
Java String, StringBuffer and StringBuilder Tutorial
Java Exception Handling Tutorial
Java Generics Tutorial
Java Collection Framework Tutorial
Java IO Tutorial - Binary Streams
Java IO Tutorial - Character Streams
Java Date Time Tutorial
Syntax and new features in Java 8
Java Regular expression Tutorial
Java Multithreading Programming Tutorial
JDBC Driver Libraries for different types of database in Java
Java JDBC tutorial
Java Compression Tutorial
Java reflection Tutorial
Java remote method invocation - Java RMI Tutorial
Java Socket Programming Tutorial
Java Desktop Application Programming using SWT
Eclipse JFace Tutorial
Commons IO Tutorial
Commons Logging Tutorial

Advanced Java

Java Programming for team using Eclipse and SVN


Customize java compiler processing your Annotation (Annotation Processing Tool)
Java Aspect Oriented Programming Tutorial with AspectJ (AOP)
Install Maven into Eclipse
Maven Tutorial for Beginners
Maven Manage Dependencies
Setup a Multiple Module Project using Maven
Install JBoss Tools into Eclipse
Java Hibernate Tutorial for Beginners
Using Hibernate Tools generate entity classes from Tables

Server-side Programming

Configuring Tomcat Server in Eclipse


Guide to installing and configuring Glassfish Web Server
Java Servlet Tutorial for Beginners
Java Servlet Filter Tutorial
Java JSP Tutorial for Beginners
Install Web Tools Platform into Eclipse
Create a Simple Web Application Using Servlet, JSP and JDBC
Using Google reCAPTCHA with Java Web Application
Run Maven Web Application in Tomcat Maven Plugin
Run Maven Web Application in Jetty Maven Plugin
Struts2 Tutorial for Beginners
Spring MVC Tutorial for Beginners - Hello Spring 4 MVC
Simple Login Web Application using Spring MVC, Spring Security and Spring JDBC
Spring MVC and Hibernate Transaction Tutorial

Struts2 Framework

Struts2 Tutorial for Beginners


Struts2 Tutorial for Beginners (Annotation Configuration)

Spring Framework

Spring Tutorial for Beginners


Spring MVC Tutorial for Beginners - Hello Spring 4 MVC
Install Spring Tool Suite into Eclipse
Configuring Static Resource and Resource Bundle in Spring MVC Tutorial
Spring MVC File Upload Tutorial
Spring JDBC Tutorial
Simple Login Web Application using Spring MVC, Spring Security and Spring JDBC
Spring MVC and Velocity Tutorial
Using Template in Spring MVC with Apache Tiles
Spring MVC and Spring JDBC Transaction Tutorial
Spring MVC and Hibernate Transaction Tutorial

Eclipse Technology

Install AspectJ development tools into Eclipse


Java Aspect Oriented Programming Tutorial with AspectJ (AOP)
How to get the open source Java libraries as OSGi(s)
Install Tycho into Eclipse
Java OSGi Tutorial for Beginners
OSGi and AspectJ integration
Building OSGi project with Maven and tycho
Install WindowBuilder into Eclipse
Java Desktop Application Programming using SWT
Eclipse JFace Tutorial
Install e4 Tools Developer Resources into Eclipse
Eclipse RCP 4 Tutorial for Beginners - E4 Workbench Application
Guide to Packing and Deploying Desktop Application SWT/RCP
Install RAP tools into Eclipse
Install RAP e4 Tooling into Eclipse
Install Eclipse RAP Target Platform
Eclipse RAP Tutorial for Beginners - Basic Application
Eclipse RAP Tutorial for Beginners - e4 Workbench Application
Create Eclipse RAP Widget from ClientScripting-based widget
Guide to packaging and deploying Eclipse RAP application
Install GEF into Eclipse
Eclipse RAP Tutorial for Beginners - Workbench Application (Earlier e4)
Eclipse RCP 3 Tutorial for Beginners - Workbench Application
Simple Eclipse RCP 3 Application - View and Editor integration

Java API for HTML & XML

Parsing an XML File Using SAX


JDOM2 Tutorial
JAXB Tutorial
Jsoup Java Html Parser Tutorial
Java Open source libraries

Skype Java API Tutorial


Using Scribe OAuth Java API with Google OAuth 2 Tutorial
JDOM2 Tutorial
Jsoup Java Html Parser Tutorial

Newest Documents

Configuring Android Simulator on Android Studio


Android Tutorial for Beginners - Hello Android
Maven Manage Dependencies
Oracle APEX Tutorial, Tabular Form
What is needed to get started with Android?
Guide to Installing and Configuring Android Studio
Java Generics Tutorial
Using Template in Spring MVC with Apache Tiles
Jsoup Java Html Parser Tutorial
Using Google reCAPTCHA with Java Web Application

o7planning.org

You might also like