Download presentation
Presentation is loading. Please wait.
Published byDwayne McDaniel Modified over 9 years ago
1
Project Implementation for COSC 5050 Distributed Database Applications Lab5
2
APEX Forms with Procedure Use of procedures Insert Form on procedure Update Form on procedure Fetch record Database fields definition Delete Button for process Process on PL/SQL
3
Use of Procedure Use of procedure for insert, update, and delete Three stored procedures ADD_HT_EMP UPD_HT_EMP DEL_HT_EMP We will create form page on a procedure
4
Form for Creating Employee Creating a form on a procedure Create page Form Form on a procedure Procedure name: ADD_HT_EMP Page name: HT Employee Proc Breadcrumb: Breadcrumb Breadcrumb parent entry: HT Employee report
5
Form for Creating Employee Tab options Use an existing tab set and reuse an existing tab within that tab set Tab set: TS1 (Home, Department, Employee…) Tab label: HT Employee report
6
Form for Creating Employee Invoking page: HT Employee (Report) Button label: Add New Employee Button region: Report Button position: Bottom of region Branching on submit and cancel: HT Employee (Report)
7
Form for Creating Employee Select procedure arguments Include all arguments Modify labels accordingly Select display type accordingly
8
Form for Creating Employee Confirmation and finish
9
Form for Creating Employee Further customization Need to label required fields Need validations for required fields Need to create LOV for department and manager Date format
10
Form for Creating Employee Create validation for required fields Page processing Validating right click Validations Create Validation level: Page item Identify the page item: first name (or last name)
11
Form for Creating Employee Create validation for required fields Name: first name not null Error display location: Inline in notification Validation type: Not null Error message: First name is required. Then Create
12
Form for Updating Employee Creating a form on a procedure for updating employee Create page Form Form on a procedure Procedure name: UPD_HT_EMP Page name: HT Employee Proc Update Breadcrumb parent entry: HT Employee (Report) Tab options Use an existing tab set and reuse an existing tab within that tab set Tab set: TS1 Use tab: HT Employee report
13
Form for Updating Employee Creating a form on a procedure for updating employee Invoking page: {none}(will invoke from report page) Button label: {none}(will invoke from report page) Branching On submit and cancel: HT Employee (Report) Select procedure arguments Modify labels accordingly Select display type accordingly Keep the EMP_ID_IN
14
Form for Updating Employee
15
Edit or create the link on the report page to invoke the update form page Edit the update form page for fetching record Add a data manipulation process for page rendering In Page rendering pane, under before header processes Right click Processes Create Data manipulation Automated row fetch Name: fetch record Table name: HT_EMP Item containing PK column value: P??_P_ID_IN Primary key column: EMP_ID
16
Form for Updating Employee
17
Employee ID needs be hidden and protected
18
Form for Updating Employee Edit each attribute item so item value can be fetched Define database column Edit item Source section Source used: Always, replacing any existing value in session sate Source type: Database column Source value or express: {table column name} (case sensitive)
19
Form for Updating Employee
20
Form for Deleting Employee Editing the form for deleting employee Create a button for delete Right click Region buttons Create Button name: DELETE Label: Delete Position: Region template position #DELETE# Action: Submit page (Optional) condition: Value of item / column in expression 1 is not null Expression 1: P??_P_ID_IN
21
Form for Deleting Employee
22
Update branching action: Right click the branch Go to page ?? Conditions section When button pressed: No button condition
23
Form for Deleting Employee Add delete confirmation: javascript:confirmDelete('Are you sure?','DELETE');
24
Form for Deleting Employee Create a process for delete Under page processing pane Right click Processes Create PL/SQL Name: Run DEL_HT_EMP PL/SQL page process: DEL_HT_EMP(:P??_P_ID_IN); (Optional) Success and error messages When button pressed: DELETE
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.