This is the last part of video series to implement Anil's OA Framework Person Details Tutorials in Oracle Application Express.
Objective: Implement Create and Update Person capabilities on my Tutorial02 application. The page at the end of tutorial my application should look similar to below screenshot.
Implementation Steps:
A brief overview of steps followed:
- Create new page 'Create Person' of type 'Form on a Table or View'. Select all columns except WHO columns for the form.
- Create database trigger on XX_PERSON_DETAILS, to populate WHO columns (Created_By, Creation_Date, Last_Updated_By, Last_Update_Date, Last_Update_Login)
CREATE OR REPLACE TRIGGER "XX_PERSON_DETAILS_T1"
BEFORE INSERT OR UPDATE
ON xx_person_details
FOR EACH ROW
BEGIN
:NEW.last_update_date := SYSDATE;
:NEW.last_update_login := -1;
:NEW.last_updated_by := 71690;
IF INSERTING
THEN
:NEW.creation_date := SYSDATE;
:NEW.created_by := 71690;
END IF;
END;
- In Search Page (1), Create a button named 'Create' at the bottom of the region to branch to Create Person Page (4). Edit the Branch to clear cache on create person page.
- In Search Page (1), change the report query to add a NULL column 'EDIT_ICON' for Edit. Define a column link on EDIT_ICON to set 'P4_PERSON_ID' and branch to Create Person page (4).
- In Create Person Page (4), add a hidden field 'P4_REPORT_TITLE'. Add a 'Before Header' computation to populate P4_REPORT_TITLE using SQL query.
select Decode(:P4_PERSON_ID,NULL,'Create Person','Edit Person - ' || :P4_PERSON_ID) from dual
- Use substitution string &P4_REPORT_TITLE. for Page Name, Page Title, Report Title and breadcrumb entry to dynamically change their names to Create Person/Edit Person.
Video:
The video demonstrations follow above implementation steps.
Video for Create Person functionality (9:39 min).
Video for Update Person functionality (10:22 min).
Screenshot of Person Details apex application after create and update person functionalities are implemented. My application can be accessed using the url http://apex.oracle.com/pls/apex/f?p=62577:1
Packaged Application for Create and Update functionalities:
My Packaged applications are created using APEX 3.2 version, you can only import them into APEX with same version. This packaged application has supporting objects i.e. table and sample data, along with apex application. You can import and run it without going through the above steps.
Download Tutorial 03 Packaged Application
Video for deploying packaged application (2:41 min). This video is applicable for deploying packaged applications for my next articles as well.
The zip file has sql files for application (apex_tut03_app.sql) and image (apex_tut02_img.sql). For deploying image, select file type as 'Image Export' as shown in below image.
This is the end of Person Details Tutorial implementation in Oracle Application Express. In the coming article, I will add more features APEX features such as Authentication, Custom templates etc. to it.
Comments
It's quite interesting.I will look around for more such post.Thanks for sharing..
all star shoes
I'd like to look more posts like this .
RSS feed for comments to this post