Vous êtes sur la page 1sur 15

Copyright 2007, Oracle. All rights reserved.

R12 Building OA Framework Applications


Implementing a Create
Copyright 2007, Oracle. All rights reserved. 10 - 2
Lesson Objectives
After completing this lesson, you should be able to:
Create a typical OA Framework insert page
Create a poplist on an OA Framework page
Extend a shared region on an OA Framework page
Write the programmatic code to respond to a button press on
an OA Framework page
Copyright 2007, Oracle. All rights reserved. 10 - 3
Implementing a Poplist
Poplists use two view objects:
VO for the base page item
View Instance
View Attribute
VO for the values in the list
Definition
Value
Meaning
Copyright 2007, Oracle. All rights reserved. 10 - 4
Extending a Shared Region
Use the Extends property to incorporate standard and other
regions into your pages.
Create a new region.
Set the new regions Extends property to the fully-qualified
name of the region you want to include.
For example,
/oracle/apps/fnd/framework/webui/OAReqFieldDescRG
Copyright 2007, Oracle. All rights reserved. 10 - 5
Creating a New Row
Before the user can enter a new row, the middle tier must
be prepared to accept the data (usually during page
initialization):
Get and initialize the view object.
Create an empty view object row, and corresponding
entity object if any, on the middle tier.
Copyright 2007, Oracle. All rights reserved. 10 - 6
Initializing a View Object
OAViewObject vo = (OAViewObject)getDetailsVO1();

// This is the standards-compliant
// way to initialize a VO that is used
// for both inserts and queries.

if (!vo.isPreparedForExecution())
{
vo.executeQuery();
}
. . .
Copyright 2007, Oracle. All rights reserved. 10 - 7
Creating and Initializing a VO Row
import oracle.jbo.Row;
. . .
Row row = vo.createRow();
vo.insertRow(row);

// OA Framework Model Coding Standard M69
row.setNewRowState(Row.STATUS_INITIALIZED);
. . .
Copyright 2007, Oracle. All rights reserved. 10 - 8
Getting the Data
The user enters values and does an action, such as
pressing an Apply button, to cause a form submit.
The processFormData method writes the user's data to
the middle tier into the view object row and triggers
validation.
If the validation is successful, commit the row to the
database.
Copyright 2007, Oracle. All rights reserved. 10 - 9
Saving a Row to the Database
import oracle.jbo.Transaction;
. . .
getTransaction().commit();
Copyright 2007, Oracle. All rights reserved. 10 - 10
Lab After Create Basics
After the first part of the Lab, Create Basics, your progress
should look similar to the following:
Copyright 2007, Oracle. All rights reserved. 10 - 11
Lab After Validations
After the second part of the Lab, Validations, your progress
should look similar to the following:
Copyright 2007, Oracle. All rights reserved. 10 - 12
Lab After Validations
After the second part of the Lab, Validations, your progress
should look similar to the following:
Copyright 2007, Oracle. All rights reserved. 10 - 13
Lab After Partial Page Rendering
After the third part of the Lab, Partial Page Rendering, your
progress should look similar to the following:
Copyright 2007, Oracle. All rights reserved. 10 - 14
Lab After Partial Page Rendering
After the third part of the Lab, Partial Page Rendering, your
progress should look similar to the following:
Copyright 2007, Oracle. All rights reserved. 10 - 15
Summary
In this lesson, you should have learned how to:
Create a typical OA Framework insert page.
Create a poplist on an OA Framework page.
Extend a shared region on an OA Framework page.
Write the programmatic code to respond to a button press on
an OA Framework page.

Vous aimerez peut-être aussi