Instructions For Running the Edit Record and Insert Record Samples

Overview

The goal of this sample application is to demonstrate how to create a simple BC4J JSP Edit Form and two types of Insert Forms.

The Edit Form allows for update of existing data from a BC4J View Object using a set of BC4J Data Tags. When run, it renders an HTML form with data from a View Object's attributes. A simple navigator is also provided allowing for record navigation.

The Insert Form has two versions: The Insert Lite Version and the regular Insert Form. The difference between the two is that the lite version does not automatically insert a blank record when the form renders. This is typical on many Internet Websites where you may want to render a registration page without necessarily entering a blank record when the user views the form. This can cause an unneeded performance drain on your application.

In the case when you are building a typical OLTP type of application which would probably be deployed in an intranet environment, you may want to use the regular Insert Form which when rendered automatically inserts a blank record. This version makes use of the BC4J Data Input Tags to render the data from the database automatically whereas the lite version just uses standard static HTML controls.

Requirements

  • You must have Oracle9i JDeveloper and acess to an 8.x database.
  • You must also have a working hr and oe schema as specified here.

 

Setup

Running the JSP application requires the following:

  • Compilation of bc4j.jpr and jsps.jpr projects

Follow these step to run the application.

  • Compile the entire Business Logic project, bc4j.jpr. This project contains the middle tier business components for the application.

  • Compile the entire JSP client project, jsps.jpr.


 

Running

To run the Edit Record sample:

  1. In the project, jsps.jpr, run the JSP emp_edit.jsp
  2. You should see an edit form where you can navigate to different records and change the employee data.

To run the Insert Record Lite sample:

  1. Run the JSP emp_insert_lite.jsp
  2. You will see an empty Insert Form. You can enter the data:
    • Empno = 9999
    • FirstName = Scott
    • LastName = Tiger
    • Email = stiger
    • Phone Number = 123-123-1234
    • Hiredate = (Use date picker to pick any date)
    • JobId = (Pick any)
    • Salary = 300
  3. Then click on the Insert Button at the bottom of the page.You will see your data being inserted.

To run the Insert Record (regular) sample:

  1. Run the JSP emp_insert.jsp
  2. You should see an empty Insert Form only this time, a record will be inserted when you render the page. Enter the same data as before.
  3. Click on "Insert" to insert the data.


 

E-mail this page
Printer View Printer View
Oracle Is The Information Company About Oracle | Oracle RSS Feeds | Careers | Contact Us | Site Maps | Legal Notices | Terms of Use | Privacy