Friday 29 March 2013

Creating Dependent LOV in OAF

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
Creating Dependent LOV in OAF
Step 2:- View Object Name=SupplierSiteVO
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
Creating Dependent LOV in OAF
Step 3:-
Click Next and go to step 5 as below.

Creating Dependent LOV in OAF
Creating Dependent LOV in OAF
Step 4:-
VO object has been created as below.
Creating Dependent LOV in OAF
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
Creating Dependent LOV in OAF
Step 6:- Application Module wizard has open as below click next

Creating Dependent LOV in OAF
Creating Dependent LOV in OAF
Step 7:-
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
Step 8:-

Creating Dependent LOV in OAF
Creating Dependent LOV in OAF
Step 9:-
Application Module has created as Below.
Creating Dependent LOV in OAF
Creating Dependent LOV in OAF
Step 10:-
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
Creating Dependent LOV in OAF
Step 11:-

Region Name="SupplierSiteRG"
Default Package="rohit.oracle.apps.RohitLovCreation.lov.webui"
Style=ListOfValues
Creating Dependent LOV in OAF
Creating Dependent LOV in OAF
 Step 12:-
Now region has created as below.
Creating Dependent LOV in OAF
Creating Dependent LOV in OAF
Step 13:-
Now we attach the Application module to this Region.
AM Definition=rohit.oracle.apps.fnd.RohitLovCreation.lov.server.SupplierSitesAM
Creating Dependent LOV in OAF
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
Creating Dependent LOV in OAF
 Step 15:-
Now Region1 has created under below region "SupplierSiteRG".
Creating Dependent LOV in OAF
Creating Dependent LOV in OAF
Step 16:-

Right Click on region2 =>Click new=>Click messagestyledtext.
Creating Dependent LOV in OAF
Creating Dependent LOV in OAF
Step 17:-

Then item1 has created below under "region1".
PropertiesFor Item1
Prompt=Vendor Site Code
View Instance=SupplierSiteVO
View Attribute=VendorSiteCode

Creating Dependent LOV in OAF
Creating Dependent LOV in OAF
Step 18:-

 Set Properties for item1
Creating Dependent LOV in OAF
Creating Dependent LOV in OAF
Step 19:-
Set View Attribute
Creating Dependent LOV in OAF
Creating Dependent LOV in OAF
Step 20 :- 

PropertiesFor Item2
Prompt=Vendor Site Id
View Instance=SupplierSiteVO
View Attribute=VendorSiteId
Creating Dependent LOV in OAF
Creating Dependent LOV in OAF
Step 21:-

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
Creating Dependent LOV in OAF
Step 22:-

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
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
Creating Dependent LOV in OAF
Step 24:-

Again Right Click on Region1=>Click New=>Click Item.
Creating Dependent LOV in OAF
Creating Dependent LOV in OAF
 Step 25:-

Then Item3 has created as below.
Creating Dependent LOV in OAF
Creating Dependent LOV in OAF
Step 26:-

Click on item3 and then in right hand side in property window set some properties.
item Style=messagelovInput.
Creating Dependent LOV in OAF
Creating Dependent LOV in OAF
Step 27:-

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
Creating Dependent LOV in OAF
Step 28:-

Create Controller for a Main Page.

Now Click on "PageLayoutRN"=>Click setnewcontroller.
Creating Dependent LOV in OAF
Creating Dependent LOV in OAF
Step 29:-

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
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
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
Creating Dependent LOV in OAF
Step 32:-

Then Controller has been created.

Now write code under the SupplierSiteAMIMPL.java class file.

Creating Dependent LOV in OAF
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
Creating Dependent LOV in OAF






If You Want to Learn Oracle Fusion , Then Please Follow the Oracle Fusion Tutorial

5 comments:

Anonymous said...

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.

Unknown said...

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

Unknown said...
This comment has been removed by the author.
Unknown said...
This comment has been removed by the author.
Anonymous said...

Good Blog.Thanks for sharing this information and helpful for me
Oracle Fusion Financials Online Training
Oracle Fusion Technical Online Training

Post a Comment

Contact us for any Collaboration, Project Support & On Job Support Work

Name

Email *

Message *