Friday, 10 June 2016

Static List Base View Object in ADF (Manually Creation of ADF Business Components and Types of View Object Part 4)

Hi Everyone this is the fourth part about Manually Creation of ADF Business Components and Types of View Object , if you haven't seen the previous post please visit the following Link

http://adfindepth.blogspot.com/2016/06/sql-query-base-view-object-manually.html

In this post I'll show you how to create Static List base View object ,
Why we need Static List base View Object ??
Suppose you have an input form name as "Student information" , and this input form store the information about Student , The form contains the fields
Std_ID
Std_Name
Std_age , and
Gender
To save Gender we have a List of Values on input  form , The List of value has three options
Male
F.Male
Other
Now in database the value of Gender will be save in following way
1) if user select 'Male' then in database 'M' will be save
2) if user select 'F.Male' then in database  'FM'  and
3) if user select 'Other' then in database 'O' will be save

To do this
First create Std_info table in hr schema
create table Std_info
(Std_id number,
Std_name varchar2(50),
Std_age number,
gender char(1))


Now Run your jdeveloper , start a new application and select Std_info table as Entity object then base on this Std_info Entity object create View Object
if you don't know how to create new application please visit the following Link
http://adfindepth.blogspot.com/2016/05/how-to-start-with-adf.html

To create Static List base View Object (later this view object will use to create list of values)

Right click on Model and select New


Then from the new Gallery select ADF Business Components from Categories and View object from Items and select OK



In next window write your view object name for this application i write staticVO and select static list as Data Source , then click next


In next window create two transient attribute name as
Defination
baseValue
To create attributes just click on New button and then write the name of attribute


In next window you can set different properties of  created attributes
for now just make sure both of the attributes are String type and baseValue attribute mark as key Attribute



In next window you can set attribute's value
to define value just click on + icon three times and set values in the following way


In next window you can add and instance of this view object to an AppModule
just checked the "add to application Module" check box
click on Browser button
then select AppModule


The next window just show the summary of this created view object just click Finish .



Continue ................
To visit the next part please click on the following Link
http://adfindepth.blogspot.com/2016/06/list-of-values-in-adf-manually-creation.html


Please Feel Free To Ask if you Face any Difficulty 
Like and share to help others
Thanks
Date 11-06-2016


No comments:

Post a Comment

Programmatically Inseration in Oracle ADF

Hello everyone in this post we will learn how we can insert data programmatically for this example i am using jdeveloper 11.1.2.3.0 and ...