Professional Documents
Culture Documents
Version : - 9.0.3
NOTE: - For OAF install Jdeveloper (developed by Java & J2ee for E-Business Suite).
Architecture of OAF:
AM VOEO D
B
The above structure is the Onion Structure; in which AM (Application Module) interact
with the VO (View Object) and VO interacts with EO (Entity Object) and EO interacts
with DB (Data Base).
NOTE: -
• EO can only interact with the Data Base.
• A page can have only one AM and AM can have number of VO and EO’s.
• To display simple page no need of VO and EO, only AM is enough.
Steps to Install OAF?
F:\Vijay_OAF.zip
Open Jdeveloper.
First create the data base connection
Right click on Connections select the New Data Base Connection
Next Give the default package name in the standard format as follows
<Identifier>.oracle.apps.<application_short_name>.<component>.webui
Next, attach the DBC file name in the DBC file name by click on browse.
Ex: - Vijay.oracle.apps.po.WelcomePG.server
Give any name for page Ex: - WelcomePG and select the package as .webui
NOTE: - Always keep the Page in .webui ok
Click on the region1, go to property inspector BC4J attach the AM Definition Ok
After developing the welcome page go to structure window right click on the region and
select New Item.
Give the item ID name (ex: - Text) and Prompt (Enter our Name) in property inspector
window
Similarly create another item with the item (Submit) item style as submit button and
give the prompt in property window and run the page.
Go to structure window right click on region1 and select the Set New Controller.
Note: - The controller should be under the .webui
Give any name to the controller with prefix with CO ex: - WelcomeCO
Click on Ok.
Here we can find two methods in controller 1) Process Request.
2) Process Form Request.
Process Request: - This method is used to display any message while page is loading the
you will write code in the Process Request. It has two parameters called pageContext
and webBean.
Process Form Data: - it works internally which is used to handle the internal validation
against BC4J components.
Process Form Request: - This method is used to display any message after taking any
action on the page then you will write code in Process Form Request. It has two
parameters called pageContext and webBean.
Note: -To display any information we have to import the following interface
import oracle.apps.fnd.framework.OAException;
Enter any text in the message input (ex:- OAF) and Click on Submit.
U can see the output on the next screen.
Clear
Clear
FAQ’s
What is Controller?
The controller responds to user action and directs to the application flow.
What are the parameters in the Processes Request and Processes Form Request?
pageContext and webBean.
Give the file name Fine Name : - <an name> ex:- Vijay ok
Next
Attach the .dbc file and give the front end username and password.
Next finish.
Next next by default it takes rowed will be the primary key (click on Yes)
Select all general methods next.
Here by default system will ask to create the VO and give the VO name ex: - searchVO
Next finish.
Now you can see that AM, VO, EO is created, then click on AM select Data Model and
attach the VO to AM
Click on apply and ok.
Write the
where clause
Ex;- searchEO.TYPE_LOOKUP_CODE=UPPER(NVL(:0,TYPE_LOOKUP_CODE))
Test the query by clicking on the test button.
Create new page by right clicking on the project name select New.
Give the page name (any name) ex; - searchPG and select the .webui ok
Automatically in the structure window one region will be created (region1).
Click on that region attach the AM Definition
Select the AM ok, and give the window title (any name) ex: - SearchPG, title (an
name) Welcome to search page.
Create another region and select the region style as Message Component Layout.
Create one message Text input
Give the ID; name for the item and give any prompt name (Ex: - Enter Type Lookup
Code)
Rebuilt the page and run the page to test. You can see the following out put.
Create another region with region style as PageButtonBar and create an item by giving
the item style as SubmitButton and give any ID name (Ex: - Search) and give any
prompt as well (Search). Rebuilt the page and test the page.
Create another region with the region style as advancetable and attach the view instance
(searchVo1) as shown in figure. Ok.
Give the item style as MessageStyledText and select the view attribute (PoHeaderId).
Click on column header New SortableHeader and give the prompt (PO Header ID)
Hear I am taking the Agent ID, Type Lookup Code, Vendor ID ….etc
NOTE: -
1. For column adjustment click on the advanced table region and change the width
as 100%.
2. To suppress any column change rendered to false (in visual of property window)
3. For space create one region with the item and region style as spacer and give
height.
Rebuilt the page and run the page you can see the following out put.
Then write the code in VO, click on searchVO select serachVOImpl.java
And write the following code in searchVOImpl.
import Vijay.oracle.apps.po.search.server.searchVOImpl;
Create controller, give the controller name (any name) and write the following code in
controller.
import oracle.apps.fnd.framework.OAApplicationModule;
import Vijay.oracle.apps.po.search.server.searchAMImpl;
import java.io.Serializable;
Rebuilt the page and test the work and you will see the out put as follows
Enter any type of purchase order like Standard, Rfq, Blanket and Contract.
In the begin you already created search page with the PO_HEADERS_ALL table with
respect to that we will take PO_LINES_ALL with respect to the PO_HEADER_ID we
have to display PO_LINES.
The final output for lines page looks like shown in fig.
Click on VO select the Query and
.message.OAMessageStyledTextBean;
import Vijay.oracle.apps.po.polines.server.polinesAMImpl;
ProcessessRequest: -
Next we need to give the link between headers and lines, to create the link follow the
steps.
You can see the final out put as shown in fig.
Enter the required details in the above screen and click on search and click on particular
header id we can get the details with respect to header id. As shown next fig.
vo1.getCurrentRow().setAttribute("SupplierId",”OracleCorp”);
import oracle.apps.fnd.framework.OAApplicationModule;
import oracle.apps.fnd.framework.server.OADBTransaction;
import Vijay.oracle.apps.po.suppliersInsert.server.supplierInsertAMImpl;
processesrequest: -
ProcessesFormRequest: -
Rebuilt the page and run the page, you can see as shown in fig.
Now you see the data in back end in the respective table vijay_suppliers.