Difference Between Oracle D2K Form and OA Framework

Step 1
First we have to create a new Workspace and a new Project as dictated by Oracle's tutorial. When defining project, you will specify a default package (oracle.apps.ak.hello).
This means the following: -
·         ak is the short name of the Application in Oracle [Means fnd_applications.short_name]
·         hello is the name of your project

Step 2: 
Then we have to create OA Page within hello project
Think OA Page as the fmx file itself in D2K. I am saying so because this page gets attached to the form function.
·         This page will be created within hello project, hence the package name oracle.apps.ak.hello.webui
·         Note the webui; it is a convention to have page in webui, means this page represents the Web User Interface.
·         You will assign the default AM [OA Application Module]. Think of AM "Connection Manager" and "Transaction State Manager" for your page
I can't co-relate this to anything in D2k, as there is no concept of Connection Pooling and that D2k is not stateless. Reason being that as soon as you kick off a D2K Form, it connects to a single session of Oracle and sticks to that single Oracle database session. So is not the case in OAF, hence AM is needed.

Step 3:
Create Region within the Page.
Region is what will store your fields. Text input fields will be of type message Text Input.
Think of Canvas in D2K. You can have nested regions. Stacked Canvas in D2K comes the
Closest to this component of OA Framework
 
Step 4:
Add a button to one of the nested regions
The item Style should be submitting Button, in case you want the page to be submitted when this button is clicked.
There is no WHEN-BUTTON-PRESSED trigger in OAF. In Framework, you will add a controller java code to handle events like Form Submit button clicks. JDeveloper generates the default code for you. Primarily two functions [should I call methods] will be created process Request [for UI Rendering Handling] and process Form Request
Think of process Request as WHEN-NEW-FORM-INSTANCE, though process Request is very restrictive.

Step 5:
In the controller to access the value in field "HelloName" the command is
String userContent = pageContext.getParameter ("HelloName");
In D2k, we used :block. Field.
In OAFramework, at submission of page, all the field values get passed into to OAPageContext object.
·         Use gets Parameter to access the field value.
·         To set the value of the field, use
OAMessageTextInputBean field
HelloName = (OAMessageTextInputBean) webBean.findChildRecursive ("HelloName"); 
                        fieldHelloName.setText (pageContext, “Setting the default value”); 





How to find all cancel Requisitions

SELECT prha . *   FROM po_Requisition_headers_all prha , po_action_history pah   WHERE      1 = 1        AND pah . object_id ...