Sunday, November 18, 2012

Setting the bind parameter to LOV in OAF

How to set the bind parameter to LOV in OAF

Recently i have been facing issues while binding parameters in LOV VO.

There is a small glitch while setting bind parameters in LOV

Consider the below one if you need to a set a bind parameter :

Never mention bind parameter and value, just make the whereClause and place it.

Normal way of bind and assigning values wont work.

Following is the way you need to use for LOV VO


   public void initDeptLOVVO()
    {
    Number dno= new Number(10);
    String whereClause = "deptNo in ("+dno+")" ;
     System.out.println("executed LOV VO ");
     clearCache();
     setWhereClause( whereClause );
     executeQuery();
     System.out.println("Dept Lov QUery-->"+getQuery() ) ; 
    }

Saturday, November 03, 2012

attachmentImage

OAF  attaching images

Item Style: attachmentImage

entityMap1 à Entity à’EMP_LEARNING’ (user defined entity name)



 Set viewAttribute à Empno(PK of the table EO Based One)
 Final Page

Attached Tables 




Saturday, October 13, 2012

CRUD operations on two tables

In this Post, we will discuss one of the general requirements of performing CRUD operations on two tables.
OAF page based on two update-able VO's using EO's

Consider the below scenario.

  1. Master Data is stored in : XXTMG_STRUCTURES
    1. STRUCT_ID is Primary Key
  2. Child Data is stored in : XXTMG_STRUCT_ATTRIBUTES
    1. ALLOC_ATTRIBUTE_ID is Primary Key
    2. STRUCT_ID is foreign Key
  3. XXTMG_STRUCTURES is having ONE to ONE relation ship between XXTMG_STRUCT_ATTRIBUTES
  4. Having VO based on SINGLE EO is quite simple and easy
  5. Having VO based on TWO EO objects is not  straight forward, for achieving this we need to customize the default generated methods.
  6. Following this link to achieve the above requirement : https://forums.oracle.com/forums/thread.jspa?threadID=61721



Thursday, August 30, 2012

List of Important Websites Regarding : Oracle Apps, OAF, FMW

List of Important Websites Regarding : Oracle Apps, OAF, ADF


Oracle Applications Integration Repository : http://irep.oracle.com/


Search engine for the official Oracle documentation.
www.tahiti.oracle.com


Oracle Applications R12 Documentation : http://docs.oracle.com/cd/B34956_01/current/html/homeset.html

Oracle Apps ETRM : http://etrm.oracle.com/pls/etrm/etrm_search.search

For Oracle WebCenter : http://yonaweb.be/webcenter_tutorial/introduction

Oracle ADF Mobile Demo : http://download.oracle.com/otn_hosted_doc/jdeveloper/11gdemos/adfmobile/ShermanNewFeatiure-ADFMobileBrowser.html


One of the good ADF Book :

Oracle ADF Real World Developer’s Guide :

 http://jobinesh.blogspot.in/2012/10/oracle-adf-real-world-developers-guide.html 


List of Websites Developed in ADF 
  1. http://www.baesystems.com/home
  2. https://www.ladwp.com/ladwp/faces/ladwp
  3.  http://www.home.agilent.com/myagilent/faces/pages_home
  4.  https://www.up.ac.za/wcportal/faces/login.jspx 
  5. http://www.barkeepapp.com:7001/BarkeepOnline-context-root/faces/NewUserPage
  6.  http://www.dreeshomes.com/new-homes/texas/dallas/find/neighborhoods/cobblestone_parks
  7. Oracle ADF Public Websites : http://www.oracle.com/technetwork/developer-tools/jdev/community/publicadf-1613113.html
  8. Bengaluru International Airport http://www.bengaluruairport.com/ 
  9. http://www.ccee.org.br/portal/faces/pages_publico;portal=ysCwQLGp1KJ0B7YhXNTwCgwv7YxPB0PClr1vGwNDGK2RBvhXJYQJ!1021062444!1589985077?_afrLoop=115470710875000&_afrWindowMode=0&_afrWindowId=null#%40%3F_afrWindowId%3Dnull%26_afrLoop%3D115470710875000%26_afrWindowMode%3D0%26_adf.ctrl-state%3D8nj67fjy3_4
  10. SOA For HealthCare https://blogs.oracle.com/SOAForHealthcare/
  11. www.panduit.com which uses fat wire and webcenter portal along with ucm and SOA/BPM

ADF  Code Samples

  1. 1.http://docs.oracle.com/cd/E18941_01/tutorials/toc.htm
  2. ADF Login Sample @  http://www.fireboxtraining.com/blog/2012/02/09/oracle-adf-11g-authentication-using-custom-adf-login-form/
  3. ADF sessions @ OOW 2012 : https://blogs.oracle.com/onesizedoesntfitall/entry/the_year_after_the_year
  4. ADF EMG Samples @ http://java.net/projects/smuenchadf/pages/ADFSamples


ADF EMG Samples

Learning any language through samples is easy. You can find the lot of samples and the same can be downloaded using SVN. kudos to the ADF EMG Team for providing the samples.

http://java.net/projects/smuenchadf/sources/samples/show

SVN Repository : https://svn.java.net/svn/smuenchadf~samples 

Wednesday, August 29, 2012

PPR On Radio Group



Steps to Create Properties View Object (PVO)
1.       Project à New ADF Business Components àView Object
2.       Specify the Name of View Object as XXTestPVO and give the corresponding package name
3.       Select Rows Populated Automatically Not Based on Query.
4.       Click Next after Step 3 , click on New and create the transient variables
5.       Create one attribute main_Attr of Type String
Select KeyAttribute ,passivate and Updatable always
6.       Create two other attributes display_rn1, display_rn2  of Type Boolean
Select Passivate and updatable always
7.       Click on Next , again Next , Select  Generate Java File , click on Next and then Finish
8.       Click on XXTestPVO and click on Tuning and select including all Transient Variables if it is not checked
9.       Now Attach it to PageAM 


Steps to implement PPR on Radio Group

1.       Create a Properties View Object (XXTestPVO) .create one Transient attribute (main_Attr) of String Type, Boolean Type Attributes as per requirement.(In Above case we created two display_rn1, display_rn2  )
2.       Since we are implementing PPR on a radiogroup item create a dummy VO
TO CREATE dummy VO Follow the below steps ;
i.                     Create a table using the following query : create table xxdummy (dummycol varchar2(30))
ii.                   Insert into xxdummy(‘abc’),insert into xxdummy(‘def’)
iii.                  Now use select dummycol from xxdummy as query and create VO , give the name as XXTestVO
iv.                 Attach it to pageAM


3.       Provide Itemname, ItemStyle, Picklist View Instance, Picklist Display Attribute , Picklist View Attribute ,Action, Event Name and parameters ,Rendered property for the item which you want to take do PPR in the Property Pallette.
Eg:
     Item Name: radGrpItm
   Item Style: MessageRadioGroup
 Picklist View Instance : XXTestVO1
Picklist Display Attribute: dummycol
Picklist View Attribute: dummycol
Action type : Fire Partial Action
     Event Name : PPREvt
     Under parameters
    Name : PPRParam
    Value : ${oa. XXTestPVO1. dummycol }
   RenderedProperty: ${oa. XXTestPVO1. main_Attr }
4.       In the Page Region 1 set Rendered as ${oa. XXTestPVO1. display_rn1 }
5.       In the Page Region 2 set rendered as ${oa. XXTestPVO1.display_rn2 }

Process Request of the CO :
      am.invokeMethod("initPPR");
Process Form Request of the CO:

     //Code for PPR
     if("PPREvt ".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM)))
{
       String radioGroupValue = pageContext.getParameter("radGrpItm "); 
System.out.println("radio group value is :"+radioGroupValue);
   
    if(radioGroupValue!=null)
    {
    System.out.println("radioGroupValue is not null , going to AM method ");
    Serializable rgvS[]={radioGroupValue};
    System.out.println("serializable value of radio button passing to AM is :"+ rgvS);
    am.invokeMethod("execPPR", rgvS);
    System.out.println("back to Co after executing payePPR method in AM");
   
    }
     }



AMImpl

  public void initPPR ()
   {
     System.out.println("in initPPR ---am");
  
     OAViewObject pvo =
       (OAViewObject)findViewObject("XXTestPVO1");
    
     pvo.executeQuery();
    
     OAViewObject vo = (OAViewObject)findViewObject("XXTestPVO1");
     if (vo.getFetchedRowCount() == 0)
      vo.setMaxFetchSize(0);
     
     XXTestPVORowImpl pprrow= (     XXTestPVO RowImpl)vo.createRow();
     pprrow.setNewRowState(OARow.STATUS_INITIALIZED);
     vo.insertRow(pprrow);
 pprrow.setAttribute("main_Attr", Boolean.TRUE);
 pprrow.setAttribute("display_rn1", Boolean.TRUE);
pprrow.setAttribute("display_rn2", Boolean.FALSE);
   }
   public void execPPR(String param)
   {
     System.out.println("inside execPPR method with payee name :"+ param);
      OAViewObject vo = (OAViewObject)findViewObject("XXTestPVO1");
     if (vo.getFetchedRowCount() == 0)
      vo.setMaxFetchSize(0);
XXTestPVORowImpl pprrow= (XXTestPVORowImpl)vo.createRow();
vo.insertRow(pprrow);
     pprrow.setNewRowState(OARow.STATUS_INITIALIZED);

     
     if ("abc’".equals(param))
      {
      System.out.println("value is abc");
pprrow.setAttribute("main_Attr", Boolean.TRUE);
 pprrow.setAttribute("display_rn1", Boolean.TRUE);
pprrow.setAttribute("display_rn2", Boolean.FALSE);
      }
    else  if ("def".equals(param))
      
      {      
        System.out.println("value is def”);
pprrow.setAttribute("main_Attr", Boolean.TRUE);
 pprrow.setAttribute("display_rn1", Boolean.FALSE);
pprrow.setAttribute("display_rn2", Boolean.TRUE);
      }
   }

regards
Rekha Kasyap .





Thursday, July 26, 2012

Create a ADF(jsp) Query Page - ADF Part4


Create a ADF(jsp) Query Page - ADF Part4








Create a ADF(JSP page), to display Employee Details - ADF - P art3

Create a ADF(JSP page), to display Employee Details - ADF - P art3

Part1 - Sample ADF Page to display Hello World
Part2 --Steps to create ViewObject(VO) fro Employee Table













Right Click on the page and Click Run


Final Output After Running the page



Tuesday, July 24, 2012

Creating a View Object(VO): ADF - Part2

Creating a View Object(VO): ADF - Part2

1.       Before creating a view object
Create a D/B connection as shown below
Here iam using : hr schema of Oracle Database




 Select the D/B connection by clicking Browse icion

 Name : EmployeeVO
Select : 2nd radio button : as we are building VO object to display data from Employees Table.






 Select check box for : Application Module



if you get the below error
Please follow the steps to resolve the issue.


Right Click on : AppModuleAM-- Run

How to learn ADF(Application Development Framework) ADF - Part1


How to learn ADF(Application Development Framework)
ADF - P art1
Perquisites:
1.       Core Java à Knowing concepts of Java is enough (class, object, method, data types etc)
2.       XML à knowing about the XML structure
3.       MVC à Knowing about the architecture is recommended

Software Requirements
1.       Oracle Jdeveloper

Can download freely from Oracle website : www.oracle.com

2.       Weblogic Server

The below sample is developed using the following Jdeveloper Version 




Hello World Program in ADF

Step1 :  Click New
 Select à Fusion Web Application (ADF)