Friday, 9 November 2018

Dependent message choice in oaf : How to Create dependent message choice in oaf

Dependent message choice in oaf : How to Create dependent message choice in oaf

In this post , We will be try to create the Dependent message choice in oaf. Dependent LOV means , The Field will show the List of value based on the selection of some other List of value so that message choice always dependent on some other message choice to show the results. In this Post , I will try to create one Dependent List of Value in OAF.
 
 

How to Create dependent message choice in oaf

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

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.
Dependent message choice in oaf
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 directroy lov under the project directory as above.
Dependent message choice in oaf
Click Next and go to step 5 as below.
Dependent message choice in oaf
VO object has been created as below.
Dependent message choice in oaf

Now we create a Application Module.
Right Click on Project "RohitLovCreation".Click New.
Dependent message choice in oaf
Application Module wizard has open as below click next

Dependent message choice in oaf
Enter the Application Module name="SupplierSiteAM"

Defualt 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.
Dependent message choice in oaf


 
Dependent message choice in oaf
Application Module has created as Below.
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.
 Region Name="SupplierSiteRG"
Default Package="rohit.oracle.apps.RohitLovCreation.lov.webui"
Style=ListOfValues
 Now region has created as below.
Now we attach the Application module to this Region.
AM Definition=rohit.oracle.apps.fnd.RohitLovCreation.lov.server.SupplierSitesAM

 Now Click on "SupplierSiteRG".Then go to Structure Pane Below  Click on Region "SupplierSiteRG".

Right Click on Region "SupplierSiteRG"=>Click New=>Click Table.
 Now Region1 has created under below region "SupplierSiteRG".

Right Click on region2 =>Click new=>Click messagestyledtext.
 Then item1 has created below under "region1".
PropertiesFor Item1
Prompt=Vendor Site Code
View Instance=SupplierSiteVO
View Attribute=VendorSiteCode

 Set Properties for item1
Set View Attribute
PropertiesFor Item2
Prompt=Vendor Site Id
View Instance=SupplierSiteVO
View Attribute=VendorSiteId

Now Click  on the Page "RohitLovCreationPG" and go to the Structure Pane and click on "Region1".
Right Click on Region1=>Click New=>Click Item.

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.

Then lovmap2 has created under Lovmapping of item1.
Click on lovmap2 and then go the property window.
Set Properties Below
Again Right Click on Region1=>Click New=>Click Item.
 Then Item3 has created as below.
Click on item3 and then in right hand side in property window set some properties.
item Style=messagelovInput.
Now Under Item3.There is "lovMapping" under this there is LovMap.
Click on lovmap2 and then go the property window.
Set Properties Below
 Create Controller for a Main Page.
Now Click on "PageLayoutRN"=>Click setnewcontroller.
 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.
Now click on Region "SupplierSitesRG".and under Structure Pane.
Right Click on Region "SupplierSitesRG"=>Click setnewcontroller.
Dependent message choice in oaf

 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.

Then Controller has been created.

Now write code under the SupplierSiteAMIMPL.java class file.
Dependent message choice in oaf

    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); 
      

 
OUTPUT IS BELOW
Dependent message choice in oaf




 
Dependent message choice in oaf



 






 

0 comments:

Post a Comment

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

Name

Email *

Message *