Adf Lab
Adf Lab
You will see Model and ViewController in HelloWorld application. Now Click on
ViewController and choose New
Halign -- center
7. Select top then go to Property Pallete and Double Click Panel Group Layout in
Layout Section
Select af:panelGroupLayout scroll under top and set following property
Halign center
8. Set Bind Action Property for commandButton
Double Click on commandButton that will open set Bind Action Property window as
shown below
Click Ok and then Write Following Code in cb1_action() which you have created just now
public String cb1_action()
{ RichInputText inputText = getIt1();
String name = "Hello "+(String)inputText.getValue()+ "!!";
ot1.setValue(name);
return null;
}
Label Name
Id it1
Id Go
Action cb1_action()
Text Go
Id ot1
Color Red
Size -- xx-large
10. Congratulation you have successfully finished. Test Your Work Your Hello World
Page is Ready
3. Create EO
Right Click on Model > New > ADF Business Components > Entity Object
Package -- Demo.adf.searchform.model.entities
Name SearchEO
Note By default ROWID will be the primary key if we will not make any column to be
primary key in Attribute Settings Page
Bind Variable name and type as following make sure required check box is un-checked
Name Col1
Type -- String
5. Create Named View Criteria
Double Click on SearchVO in Model Project go to query page. Expand the View Crriteria
accordion and click on Green button
View Criteria is actually conditions on VOs which you usually define declaratively
1. Expand the View Critieria Section in SearchVO page and click the Green plus sign
2. Give a proper name to your View Criteria
Criteria Name -- SearchVOCriteria
3. Click on Add Item
Click the ( ) group press Add item and select values as sown in slide make sure you have
selected the bind variable Col1
Attribute Column1
Operator Equals
Operand Bind Variable
Parameter Col1
Un-check Ignore Case and Check Ignore Null Values
6. Create Search Form
Right Click on ViewController > New > Web Tier > JSF > JSF Page
File Name Search
Initial Page Layout and Content Quick Start Layout
Click on Browse and select One Column Stretched and check Apply Theme
Expand Page Implementation and Select Automatically Expose UI Components in a New
Managed Bean
Select SearchVO and Expand the Data Control panel and Drag and drop the Named View
Critieria SearchVOCriteria to the page
Choose Query > ADF Query Panel with Table as shown in the slide
The Page would look like this --
7. Refine Layout
Change the Header from SearchEO to Search Demo. To change select panel Header and
change Text property to Simple Search Demo
Note - You can change form properties like Column names and page width as per your
requirements
8. Congratulation you have successfully finished. Test Your Work Your Simple Search Form
is Ready
3.Creating LOV tab in oracle applications:
2. We need to have table from where LOV values will come. Lets Create table
Right Click on Model > New > ADF Business Components > Entity Object
Package -- Demo.adf.lov.model.entities
Name Column1EO
Note By default ROWID will be the primary key if we will not make any column to be
primary key in Attribute Setting Page
Package Demo.adf.lov.model.queries
Name Column1VO
Package Demo.adf.lov.model.services
Name Column1AM
5. Create View Object for Column1 LOV (View Object)
Right Click on Model > New > ADF Business Components > View Object
Package -- Demo.adf.lov.model.queries
Name Column1LovVO
6. Create LOV
Select Column1 attribute in attribute page and click + green button at the bottom
under List of Values Section
Click the green + button with List Data Source
Select Column1LovVO in Available object and change the Name at bottom to
Column1LOVAcessor and Press > button to Create Accessor for LOV and click OK
Choose Column1 in List Attribute Return Values will populate automatically. Your
screen should similar to this
Go to UI Hints tab Leave the list type asChoice List (There are many type of LOVs available)
Move Column1 Name from Available to Selected Area
Choose Labeled Item (First of List) at very bottom Include No Selection Item:
Click OK
Right Click on ViewController > New > Web Tier > JSF > JSF Page
Menu will appear select Single Selection > ADF One Choice List as Shown in the Slide
9. Congratulation you have successfully finished. Test Your Work Your LovDemo Page is
Ready
Conclusion
With Oracle ADF application development becoming fast and easy. See how easy is to
create LOVs in your ADF application as like in Oracle Forms
Package -- Demo.adf.masterdetail.model.entities
Name MasterEO
Note By default ROWID will be the primary key if we will not make any column to be
primary key in Attribute Setting Page
Package Demo.adf.masterdetail.model.queries
Name MasterVO
Right Click on Model > New > ADF Business Components > Entity Object
Package -- Demo.adf.masterdetail.model.entities
Name DetailEO
Note By default ROWID will be the primary key if we will not make any column to be
primary key in Attribute Setting Page
Name DetailVO
Right Click on Model > New > ADF Business Components > View Link
Package -- Demo.adf.masterdetail.model.queries
Name MasterDetailVL
(Because Column1 is common column between both the tables as per our assumption to
create view link)
Leave the default Accessors Names as shown in slide and press Finish
7. Create AM (Application Module)
Right Click on Model > New > ADF Business Components > Application Module
Package -- Demo.adf.masterdetail.model.services
Name MasterDetailAM
Right Click on ViewController > New > Web Tier > JSF > JSF Page
Text Master
3. Drop another Panel-splitter in second facet and set the Orientation property to
Vertical from Property Inspector
4. Drop Panel Accordion in the first facets of the Last panel splitter set
Text Detail
5. Drop Panel Accordion in the Second facet of the last panel-splitter set
Expand the Data Controls Drag MasterVO1 to Detail Panelbox and choose Form > ADF
Read-only Form. Choose the fields as shown in the slide
Note Select Checkbox Include Navigation Controls
Expand the Data Controls Drag DetailVO1 to Detail Panelbox and choose Table > ADF
Read-only Table
Note -- Select CheckBox Enable Sorting and Enable Filtering and Under Row
Selection select Multiple Rows
Expand the same DetailVO1 node from data control and drag to Edit Detail section and
choose Form > ADF Form. Choose the fields as shown in the slide
Note Select CheckBox Include Submit Button
Final page will look like this following slide
Set Style Class Property to AFStrechWidth for af:panelAccordion pa2 Panel as shown
in slide. For Accordion to stretch the table at Runtime
10. Congratulation you have successfully finished. Test Your Work Your Master Detail
Page is Ready