Monday, 17 September 2012

Sequence of OA Frame work (Communication Model) OF EO,VO,AM


Note: - Controller Must Not directly Interact with View Object
Sequence of OA Frame work (Communication Model) OF EO,VO,AM
Controller (CO) associated with html/XML Page regions (View) side: -   CO Calls a method reside in Application Module (AM) to do something and forward the processing to AM.
Controller contains
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
  {
    super.processRequest(pageContext, webBean);
}
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
  {
  super.processFormRequest(pageContext, webBean);
}
Methods.
Application Module AM creates a handle for the view object and executes the query, and provide handle to the result set of the query in shape of View Object in memory (VO).

View is just like a Result Set base on Entity Object (EO).

We can also say that Controller calls a method in AM( method which creates a blank row in the View Object)  which is  then linked to EO (Entity Object).



View     (XML/HTML File)à VO and Entity Object reside in Modelà  Controller
COàAMàViewàEO
                    (Model)              

Tuesday, 4 September 2012

report and function togather to be called


Query :-

select eno,ename,edepartment  from employeetest where eno in (Select * from mytempvals);

Function to be called for remove the , between values and insert the values in the table

create or replace function separate5(a varchar2)return number

is

 

begin

--truncate table mytempvals

delete from mytempvals;

for i in 1..9 loop

insert into mytempvals

select substr(a,instr(a,',',1,i)-2,2) from dual;

end loop;

 

commit;

return 1;

end;

Triger to be called from the report to call the above function after getting value of :empno (10,20,40,30)

function AfterPForm return boolean is

    r number;

 --   V_eno    mytempvals.employeename%type;

--    CURSOR emp_cur IS  

  --  SELECT employeename

   -- FROM  mytempvals;

begin

  r:=separate5(:empno);

  --OPEN emp_cur;

  --For i in 1..9 Loop

  --FETCH emp_cur INTO V_eno;

  --END Loop;

 --CLOSE emp_cur;

  return (TRUE);

end;