Wednesday, August 18, 2010

OAF : Working on LOV

LOV : List of Values.

There are many a times we use this bean in our page.

let us consider how to know whether an LOV event is raised...
Using isLovEvent() we can determine whether a lov event is fired or not.

But that is not enough :
Consider the following example

I have an LOV an Poplist...

Deppt : LOV
Emp : PopList..

Based on the value selected in LOV..
The poplist is fired..
But if i just give an invalid value in LOV( -10 the lov query doest not have dept no :10)
So the LOV event is fired and Poplist is fired..

if(isLovEvent)
{
invokeMethod(populate PopList);
}

My requirement is to fire the poplist if there is a valid value selected from LOV..
This requirement can be handled in the following

Have a form value for fvDept :
create another lovmap : for the dept LOV and for that lovmap return item to fvDept.

Now the solution is :
if user enters a value and LOV event is fired... fvDept will have valid value if and only if the value is part of LOV list..
So now use the following condition :

if(isLovEvent)
{
String fvDeptValue = pc.parameter("fvDept");
if(fvDeptValue!=null && !"".equals(fvDeptValue))
{
invokeMethod(populate PopList);
}
}

Friday, August 13, 2010

OAF For Newbies

I have been working with OAF around 2 years... Most of the freshers find difficult to start with ... As user guide does not help much for the starters to start on..
I Just want to help,share and learn.. what all i know....
To start with we will consider.. little about the structure of the
OAF and its prerequisites :

Software Requirements : Jdeveloper editor, Oracle APps instance...
Programming Languages : Core Java, [optional HTML, JavaScript]

Lets start with the first step :

1.Oracle Application Framework(OA Framework) is a proprietary framework developed by Oracle Corporation for application development within the Oracle E-Business Suite.
2.Available to customers for personalization, customizations and custom-application development.
3.The OA Framework is a Model-view-controller (MVC) framework built using J2EE (Java 2 Platform, Enterprise Edition)technologies.



Components of MVC Architecture

Model:
Data
Implemented using Oracle Business Components for Java (BC4J).
1.EO (Entity Object)
2.VO (View Object)
3.AM (Application Module)
View:
User Interface.
Implemented using an Oracle technology called UIX.
(UIX = User Interface XML).
Controller:
Code
User actions are handled by the OA Controller.
(Ex: Clicking SUBMIT button)


Thursday, August 12, 2010

OAF-- Query Bean :)

the following will make the user to execute the search criteria manually :)

OAQueryBean queryBean= (OAQueryBean)webBean.findIndexedChildRecursive("queryRN");
StringBuffer whereClause=null;
Number cycleID=null;
// This gives you the current non-view attribute criteria
Dictionary[] dic = queryBean.getCriteria(pageContext);