How to Create Dependent LOV in OAF Page
In this Post we will try to create a Dependent LOV in OAF Page. I have Already Explain in my previous Post that how we we can create LOV in OAF Page. In this Post , We will discus how we can create a Dependent LOV in OAF. We will share the detail steps with complete screenshots to create the dependent LOV in OAF page. In Dependent LOV , The second LOV will be dependent on the first OAF Page LOV. The results of the dependent LOV will depend on the value selected in the First LOV. I would recommend to go through the Previous Post about creating LOV in OAF. Here Below is the link mentioned:In the Below link You will find we have created a Supplier Lov in OAF Page.We will start creating Dependent Lov from there.
http://rpforacle.blogspot.com/2013/03/creating-lov-in-oaf-page.html
Step By Step to Create the Dependent LOV in OAF
Step 1:-
After Creating Supplier Lov in the Above Post mentioned in the Link Above.Now in this Post i will Create a Supplier Site Lov Which is Dependent on Supplier Lov Which is created In Above Link.So now I am going to start Dependent Lov .My workspace and Project will remain same which we have created in Above mentioned Link.
Create View Object(VO).
Right Click on Project "RohitLovCreation".Click New.
Click on "View Object".Click ok.
Creating Dependent LOV in OAF |
Defualt Package="rohit.oracle.apps.RohitLovCreation.lov.server"
This VO is for LOV so to identify easily we we will create another directory lov under the project directory as above.
Creating Dependent LOV in OAF |
Click Next and go to step 5 as below.
Creating Dependent LOV in OAF |
VO object has been created as below.
Creating Dependent LOV in OAF |
Step 5:-
Now we create a Application Module.
Right Click on Project "RohitLovCreation".Click New.
Creating Dependent LOV in OAF |
Step 6:- Application Module wizard has open as below click next
Creating Dependent LOV in OAF |
Enter the Application Module name="SupplierSiteAM"
Default Package="rohit.oracle.apps.fnd.RohitLovCreation.lov.server"
we create "Application module" under the "Server" directory of the project as OAF Standard.
Go to Step 2 and Shuttle the View Object "SupplierSitesVO" to the right hand side.
Creating Dependent LOV in OAF |
Creating Dependent LOV in OAF |
Application Module has created as Below.
Creating Dependent LOV in OAF |
For Supplier Sites LOV We need to create another region.
So to create "Region" Right Click on the Project "RohitLovCreation".Click New.
Select Region and then OK.
Creating Dependent LOV in OAF |
Region Name="SupplierSiteRG"
Default Package="rohit.oracle.apps.RohitLovCreation.lov.webui"
Style=ListOfValues
Creating Dependent LOV in OAF |
Now region has created as below.
Creating Dependent LOV in OAF |
Now we attach the Application module to this Region.
AM Definition=rohit.oracle.apps.fnd.RohitLovCreation.lov.server.SupplierSitesAM
Creating Dependent LOV in OAF |
Step 14:-
Now Click on "SupplierSiteRG".Then go to Structure Pane Below Click on Region "SupplierSiteRG".
Right Click on Region "SupplierSiteRG"=>Click New=>Click Table.
Creating Dependent LOV in OAF |
Now Region1 has created under below region "SupplierSiteRG".
Creating Dependent LOV in OAF |
Right Click on region2 =>Click new=>Click messagestyledtext.
Creating Dependent LOV in OAF |
Then item1 has created below under "region1".
PropertiesFor Item1
Prompt=Vendor Site Code
View Instance=SupplierSiteVO
View Attribute=VendorSiteCode
Creating Dependent LOV in OAF |
Set Properties for item1
Creating Dependent LOV in OAF |
Set View Attribute
Creating Dependent LOV in OAF |
PropertiesFor Item2
Prompt=Vendor Site Id
View Instance=SupplierSiteVO
View Attribute=VendorSiteId
Creating Dependent LOV in OAF |
Now Click on the Page "RohitLovCreationPG" and go to the Structure Pane and click on "Region1".
Right Click on Region1=>Click New=>Click Item.
Creating Dependent LOV in OAF |
Then Item2 has created Below.
Under Item1.There is "lovMapping" under this there is LovMap1 which we already created in Post Lov Creation.
Now Right Click on "lovMapping"=>Click New=>Click lovmap.
Creating Dependent LOV in OAF |
Step 23:-
Then lovmap2 has created under Lov mapping of item1.
Click on lovmap2 and then go the property window.
Set Properties Below
Creating Dependent LOV in OAF |
Again Right Click on Region1=>Click New=>Click Item.
Creating Dependent LOV in OAF |
Then Item3 has created as below.
Creating Dependent LOV in OAF |
Click on item3 and then in right hand side in property window set some properties.
item Style=messagelovInput.
Creating Dependent LOV in OAF |
Now Under Item3.There is "lovMapping" under this there is LovMap.
Click on lovmap2 and then go the property window.
Set Properties Below
Creating Dependent LOV in OAF |
Create Controller for a Main Page.
Now Click on "PageLayoutRN"=>Click setnewcontroller.Creating Dependent LOV in OAF |
Enter the Controller Name="RohitLovCreationCO"
Package="rohit.oracle.apps.fnd.RohitLovCreation.webui"
According to the OAF standard controller has creater under the webui of the project directory as shown above. Click Ok.
Creating Dependent LOV in OAF |
Step 30:-
Now click on Region "SupplierSitesRG".and under Structure Pane.
Right Click on Region "SupplierSitesRG"=>Click setnewcontroller.
Creating Dependent LOV in OAF |
Step 31:-
Enter the Controller Name="SupplierSiteCO"
Package="rohit.oracle.apps.fnd.RohitLovCreation.lov.webui"
According to the OAF standard controller has creater under the webui of the project directory as shown above. Click Ok.
Creating Dependent LOV in OAF |
Then Controller has been created.
Now write code under the SupplierSiteAMIMPL.java class file.
Creating Dependent LOV in OAF |
Step 33:-
public void siteFilter(String vendorid)
{
OAViewObjectImpl oav=(OAViewObjectImpl)findViewObject("SupplierSiteVO");
oav.setWhereClause("VENDOR_ID=:1");
oav.setWhereClauseParam(0,vendorid);
}
write Code under Process Form Request in RohitLovCreationCO Controller
OAApplicationModule am=pageContext.getApplicationModule(webBean);
OADBTransaction trx=am.getOADBTransaction();
if (pageContext.isLovEvent())
{
String lovid=pageContext.getLovInputSourceId();
if (lovid!=null && "item1".equalsIgnoreCase(lovid))
{
String vendor=(String)pageContext.getParameter("item2");
trx.putValue("vendoridsession",vendor);
}
write Code under Process Form Request in SupplierSiteCO Controller
OAApplicationModule am=pageContext.getApplicationModule(webBean);
OADBTransaction trx=am.getOADBTransaction();
String vendoridBasePage=(String)trx.getValue("vendoridsession");
Serializable[] sp = {vendoridBasePage};
am.invokeMethod("siteFilter",sp);
Step 34:-
OUTPUT IS BELOW
Creating Dependent LOV in OAF |
If You Want to Learn Oracle Fusion , Then Please Follow the Oracle Fusion Tutorial
5 comments:
Hi Rohit,
Thank you for sharing your knowledge on OAF but I am unable to get resolution for one issue with respect to Absence module of HRMS. I wish to get some help from you.
Issue description :
In XML document of hr_api_transactions the how these attributes
are derived.
I am trying to create absence functionality from back end which can trigger notification and perform similar way while working with EBS. I am getting lost with the above cdata parameter, when I open the notification it raises Null pointer Exception.
Please let me know what can I do to move this to resolution. please let me know if you need any further information.
Thanks
S.Jain.
Nice blog.
an Oracle OAF online training and save it to some flat file and may directly upload the same, in another example, to an identical page.
ORACLE OAF ONLINE TRAINING
Good Blog.Thanks for sharing this information and helpful for me
Oracle Fusion Financials Online Training
Oracle Fusion Technical Online Training
Post a Comment