Thursday 19 December 2013

How to Find OAF Page Function


1)Go to Page and click on about this page

2) copy page path  /xxx/oracle/apps/per/selfservice/appraisals/objectives/webui/ObjSettingPG

3)Click on pageContext Tab

4)click on Expand all
 then search /xxx/oracle/apps/per/selfservice/appraisals/objectives/webui/ObjSettingPG

5)Then you get function name under function column and page path under html call column

Friday 18 October 2013

Change Background Color in OAF


import oracle.cabo.style.CSSStyle;

                 CSSStyle customCss = new CSSStyle();
                 customUnCss.setProperty("background-color", "    #ee0000");//# -red
                 OAMessageStyledTextBean styledTextBean =(OAMessageStyledTextBean)webBean.findIndexedChildRecursive("POCommentsItem");
                 if(styledTextBean!=null)
                 {
                  styledTextBean.setInlineStyle(customUnCss);
                 }


Tuesday 17 September 2013

Break SubTabs in Two line

Break SubTabs in Two line

Line 1 --> 2 SubTabs

Line 2 --> 2 SubTabs

1. Create LabeFiedLayout under PageLayoutRN

2. Create Two SubLayout Under LabeFiedLayoutRN.
   Property.

    1.First SubtabLayout set InitialSubTab 0.
    2.Second SubtabLayout set InitialSubTab 2.

3. Add Spacer Item in between two SubLayoutRN

4. Select First SubTabLayout add 2 Region Style

5. Select SubTabs and create StatusBar

6. Create 2 Link Item under StatusBar also set PartialFireAction of each.

7. Select second SubTabLayout add 2 Region Styles.

8. Select SubTabs and create StatusBar

9. Create 2 Link Item under StatusBar also set PartialFireAction of each.

OutPut:












Thanks,
Dilip

Wednesday 11 September 2013

Hide and Show region in PFR on Event

Here is  custom working solution for  Hide and Show region in PFR .


Step1: Declare global variable.

private static int chk = 0;


Step2: Write below code in PR

//Here im hiding Advanced Table Region


OAAdvancedTableBean table2 = (OAAdvancedTableBean)webBean.findChildRecursive("Table2RN");

     table2.queryData(pageContext, true);

    if (chk==1)

           {

             table2.setRendered(Boolean.TRUE);

           }

           if(chk==0){

             table2.setRendered(Boolean.FALSE);

           }


Step3: Write below code in PFR

if (pageContext.getParameter("SaveBtn") != null) //Show Table

              {
                chk = 1;

                pageContext.setForwardURLToCurrentPage(null, // no parameters to pass

                true, // retain the AM

                OAWebBeanConstants.ADD_BREAD_CRUMB_NO,

                OAWebBeanConstants.IGNORE_MESSAGES);

              }

 Thanks,
 Dilip

Thursday 5 September 2013

java.lang.IllegalAccessError, msg=oracle/jdbc/driver/OracleCallableStatement


oracle.apps.fnd.framework.OAException: oracle.jbo.JboException: JBO-29000: Unexpected exception caught:  java.lang.IllegalAccessError, msg=oracle/jdbc/driver/OracleCallableStatement

Solution:

  Import     import oracle.jdbc.OracleCallableStatement;


Thanks,
Dilip

Wednesday 21 August 2013

Converting String to the Number


When a Number is rendered as a String in the browser we can convert it to Number using getOANLSServices().stringToNumber method.

String quoteHdrNum = getQuoteContextParam(pageContext, "QotCtxtHdrNum");
java.lang.Number QuotNum= pageContext.getOANLSServices().stringToNumber(quoteHdrNum );
  {
     //do Operation
  }

Tuesday 6 August 2013

Create Data Entry Page In ADF



1.Create New Application

  1.Application Name:EmployeeForm
  2.Application Package Prefix:dilip.oracle.adf.empform
   







 2.Create ADF Business Component(Enity Object,ViewObject,Application Module)

  1.Entity Object:

   Name:EmployeesEO

   Package:dilip.oracle.adf.empform.model

   Schema Object :Employees

   




 

 

  Enable Create Method and Remove Method

   

 Check Generate Default View Object CheckBox

  2.ViewObject:

   Name:EmployeesVO

   package:dilip.oracle.adf.empform.model

  Check Application Module CheckBox

  3.Application Module:

   Name:EmployeeAM

   package:dilip.oracle.adf.empform.model 
   
     

   






     

6. Create Search Page

Right Click on ViewController -> New -> Web Tier->JSF/Facelet->Page

File Name – Employee

Initial Page Layout and Content – Quick Start Layout

Click on Browse and select One Column Stretched and check Apply Theme
  
  

  


7.Expand Page Implementation and Select Automatically Expose UI Components in a New Managed Bean
  
      




8.Drag Decorative Box in Jsf page





9.Select EmployeeVO and Expand the Data Control panel and Drag and drop the EmployeesVO1 to the   page Choose Query -> ADF

Form Panel as shown in Slide. 











10.Add Commit and Create Operations in Page

Select DataControls -> DataEntryAMDataControl -> Operations

Drag Commit Operation in page

Similarly Select DataControls > DataEntryAMDataControl > EmployeesVO1 > Operations

Drag Create Operation in page


11.Drag ADF button to Page(Create and Commit)

  



  

12.Select Commit button and make field Disabled properties to NULL.
     

13. See EmployeeEntry Page Below.

  

 14.New Record in Database








      

Monday 5 August 2013

Search Page in ADF

You can create search page that allow users to enter search criteria into input fields for known attributes of an object.The search criteria can be entered via input text fields or selected from a list of values in a popup list picker or dropdown list box. The entered criteria is constructed into a query to be executed. Named bind variables can be used to supply attribute values during runtime for the query. The results of the query can be displayed as a table, a form, or another UI component as per need.

Search page are based either on view criteria defined in view objects or on implicit view criteria defined by JDeveloper. Search pages are region-based components that are reusable and personalizable. They encapsulate and automate many of the actions and iterator management operations required to perform a query.
 You can create several search forms on the same page without any need to change.

1.Create New Application

  1.Application Name:EmployeeSearch
  2.Application Package Prefix:dilip.oracle.adf.searchEmp

  
  
           
  
       







      








 


 2.Create ADF Business Component(Enity Object,ViewObject,Application Module)

  1.Entity Object:
 
   Name:EmployeeEO
   Package:dilip.oracle.adf.searchEmp.entities
   Schema Object :Employees
   
     



  
  


  Enable Create Method and Remove Method
   
  
    
 Check Generate Default View Object CheckBox
  2.ViewObject:
   Name:EmployeeVO
   package:dilip.oracle.adf.searchEmp.service 

  

 
  Check Application Module CheckBox
  3.Application Module:
   Name:EmployeeAM
   package:dilip.oracle.adf.searchEmp.queries

       

3.Define Bind Variable:

   Double Click on EmployeeVO in Model  go to query page

   Expand the Bind variable accordion and click on Green button

   Bind Variable name and type as following make sure required check box is un-checked

   Name – empno

   Type -- Number

 

 

4. Create Named View Criteria

 Double Click on EmployeeVO in Model  go to query page. Expand the View Criteria accordion
  and  click on Green button
 


View Criteria is actually conditions on VOs which you usually define decoratively

     1.Expand the View Critieria Section in EmployeeVO page and click the Green plus sign

     2.Give a proper name to your View Criteria

       Criteria Name -> EmployeesVOCriteria

     3.Click on Add Item  Click the ( ) group press Add item and select values as sown in slide make sure
       you have selected the   bind    variable empno

          Attribute – Employee_id

          Operator – Equals

          Operand – Bind Variable

          Parameter – empno

          Un-check Ignore Case and Check Ignore Null Values
         
           


    
6. Create Search Page

Right Click on ViewController -> New -> Web Tier->JSF/Facelet->Page

File Name – EmpSearch

Initial Page Layout and Content – Quick Start Layout

Click on Browse and select One Column Stretched and check Apply Theme

 



7.Expand Page Implementation and Select Automatically Expose UI Components in a New Managed Bean

Select EmployeeVO and Expand the Data Control panel and Drag and drop the Named View Critieria “EmployeesVOCriteria” to the page Choose Query -> ADF Query Panel with Table as shown in Slide.




8.Change Search Header from "EmployeeEO" to Employee Search
   Change Text Property Search Employee.Also see resulted Search Page.
   


Sunday 4 August 2013

Hello World In ADF

1. Create a New Application
    New > Applications > Fusion Web Application (ADF).


   

2. Application Name: HelloWorld
    Application Package Prefix:dilip.oracle.adf.hello

   

3.Select ADF Business Component.




4.Select ADF faces.

5.Select jsf/facelets-->Page from webTier
 





6.File Name –  HelloWorld.jspx
  Check “Create XML Document (*.jspx)”
  Select “Blank Page” in “Initial Page Layout and Content” Section

  

 

 7. Drag Decorative Box from Layout option available in Component Palate
 
    

8.Drag item of type “Input Text”, “Button” on the center facet of decorativeBox from Common Components Section.
           Set Label Property :Enter Here 
       

9.Drag item of type Output Text”, “Button” on the Top facet of decorativeBox from Common Components Section.
            Delete OutpuText1 in the value field property from Common Components.

10.Drag Command Button on Center Face.
        Set Text Property to :Go.   

11. Select TOP “af:decorativeBox” then go to Property Pallete and Double Click “Panel Group Layout” in “Layout” Section
Halign -- center
    



12.Select Center  “af:decorativeBox” then go to Property Pallete and Double Click “Panel Group Layout” in “Layout” Section
Halign -- center



13. Set Bind Action Property for commandButton.

   Double Click on commandButton that will open set Bind Action Property window as shown below.






Click Ok and then Write Following Code in cb1_action() which you have just created(in HelloWorld.java)



        RichInputText inputText = getIt1(); 
            String name = "Hello "+(String)inputText.getValue()+ "!";
            System.out.println("This Is Entered "+name);
            ot1.setValue(name);

14. See HelloWorld Result Page: