Friday, January 10, 2014

How to Add New Row to a Table Region in OAF

How to add new row to table region in OAF

Now we are going to learn about how to add a new row to table region.
Suppose we have a requirement that when we click on add button it has to create a new row to enter the data.




Step 1:- Right click on table region select footer.

Step 2:- right click on table footer select new -- > addTableRow.

            




Write the below code in the processFormRequest of a controller 


OAApplicationModule  am = (OAApplicationModule)pageContext.getRootApplicationModule();      
OAAdvancedTableBean tableBean = (OAAdvancedTableBean)webBean.findIndexedChildRecursive("PdqSystemParametersEOVORN");
       
      OATableFooterBean footerBean = (OATableFooterBean)tableBean.getFooter();

      if(footerBean != null)
      {
          OAAddTableRowBean addTableRowBean = (OAAddTableRowBean)footerBean.findIndexedChild("addTableRow1");

          if(pageContext.getParameter("event") != null && "addRows".equals(pageContext.getParameter("event")))
          { 
              am.createAnotherRow();       
   DBTransaction dbt = am.getDBTransaction();
              dbt.commit();
            }                
       }


Create one method called createAnotherRow() in am.

    public void createAnotherRow()
    {
        Row row1 = null;
        OAViewObject VO1 = null;
        VO1 = getPdqSystemParametersEOVO1();         
        row1 = VO1.createRow();
        VO1.setCurrentRow(VO1.last());         
        VO1.next();
        VO1.insertRow(row1);
        row1.setNewRowState((byte)-1);
        row1.setNewRowState((byte)-1);

    }

Now run the page and see the output.



Now click on add button.



The new row has been created.



     

Thursday, January 9, 2014

How to ADD/Remove Global Buttons in OAF Page.

How to Add/Remove Global Buttons in OAF Page.

 Now we are going to learn about how to add or remove global buttons from OAF page.
 

ADD Global Buttons.

Oracle has created the standard menu for global buttons like(Home, Logout, Preferences etc) called
ICX_STANDARD_GLOBAL_MENU to add these buttons just add this menu to your menu which contains your page.
 

Disabling the Global Buttons

To disable the global buttons write the below code in the processRequest of your page controller.
 
OAPageLayoutBean page = pageContext.getPageLayoutBean();
 
// You must call prepareForRendering() if the following code is
// included in a pageLayout controller. If you add it further down
// in the layout hierarchy, the menus will be fully processed so you
// don't need to do this  


page.prepareForRendering(pageContext);
OAGlobalButtonBarBean buttons = (OAGlobalButtonBarBean)page.getGlobalButtons(); 
 
// Hide the Global buttons

buttons.setRendered(false); 

or  
// Disable the Global buttons
 

 buttons.setDisabled(true);
 

 
 

 

Wednesday, January 8, 2014

How to Bounce Apache Server in R12

How to Bounce Apache Server in R12

 
 
To bounce the Apache first connect to server through putty.
 
 
Now change the directory to INST_TOP 
 
         cd $INST_TOP
         cd admin/scripts
 
Now run the below commands 
  • adapcctl.sh stop
  • adapcctl.sh start 
  • adoacorectl.sh stop
  • adoacorectl.sh start


Tuesday, January 7, 2014

Adding HTML Tab/Menu to the standard OAF page.

Adding HTML Tab/Menu to the standard OAF page.



Now we are going to learn about how to attach the HTML Tab menu to standard OAF Page.

Steps to achieve this.

Suppose this is your standard page.



Step1:- Note down the Responsibility of this page.

Step2:- Note down the Menu attached to this Responsibility.

Step3:- Note down the home page menu attached to this Menu.

Step4:- Create a function for each page that you want to display. 

            ASIC Planning.
            Navigation: Application Developer>Application>Function.

            Enter the following details.

           

Step5:- Create a menu of type "HTML Tab" for each tab you want to display.

             ASIC Planning Parameters.
             Navigation: Application Developer>Application>Menu.
             Enter the following details.


           

            Add each function to its corresponding tab menu. Do not specify any Prompt values.

Step6:- Attach the menu to Home Page Menu which u note down in step 3 as sub menu.

           

Step7:- The Home page menu is attached to Menu which is attached to responsibility.

           
          
           Now go to the responsibility and check the tab is added or not.

  


































Monday, January 6, 2014

How to create TAB Page in OAF

How to create TAB Page in OAF



Now we are going to learn about how to create the tab pages in OAF

 

Steps to create Tab pages in OAF

Consider there are two pages.

Step1:-Create a function for each page that you want to display.
For first page while creating function in webHtml tab along with page path provide home page menu name and function name.

OA.jsp?page=/xxsy/oracle/apps/msd/SYNDemantra/webui/SYNDemantraPG&OAHP=MSD_DEM_HOMEPAGE_MENU&OASF=XXSY_DEM_IMP

  
For second page juct create a normal function.
            
                OA.jsp?page=/xxsy/oracle/apps/msd/SYNDemantra/webui/UploadStatusPG          
                      
                                                                                                                                                   
Step2:- Create a menu of type "HTML Tab" for each tab you want to display.

              attach the first function you have created.
                    

            Create another one menu of type HTML TAB for second function.
           

 Step3:- Create a menu of type "Home Page" .  
         
Step4:- Add the tab submenus to the "Home Page" menu.

Add the tab menus in your desired display sequence from left to right. The leftmost tab should be added first.
Remember to specify Prompt values for each tab submenu. These values display as the tab text.
            

Step5:- Add your "Home Page" menu to your responsibility menu.
            And add first function that u have created with specifying HomePage menu in there web       
            html to responsibility menu.     
       

Step6: - This finishes the creation of tab pages. Navigate to the responsibility and click on the 
             function and see the page.