Oaf Interview Questions Part14

Oaf Interview Questions, www.askhareesh.com
131. What is Passivation?
passivation is the process of saving application state to a secondary medium (the database) at specific event points so it can be restored (activated) when needed.

132.How do you get the value from the database sequence?
OADBTransaction transaction = getOADBTransaction();
Number employeeId = transaction.getSequenceValue(“SEQ Name”);
setEmployeeId(employeeId);

133. How do you perform your validation in OAF?
All OAF validations are done in the Entity Object.

134. How do you copy rows from one vo to another?
To copy multiple rows you can add the multipleSelection item for the table.Check which row is selected and write code for implementing this.

135.What is a transaction unit in OAF?
With the transaction unit identifier, you can indicate when a specific UI task begins and ends, and if the user navigates in an unexpected manner such as using the browser Back button. You can check the transaction unit status and react to ensure that inappropriate actions are not performed and unwanted data in the BC4J cache is not committed.
136. How to implement a dependent poplist?
Dependent poplist can be implemented by enabling firePartialAction and capturing the event for the source poplist and passing the value selected in the source to the method where we set the where clause and execute the query for the destination poplist.

137.How do we pass parameters between pages?
pageContext.forwardImmediately(“OA.jsp?page=/xxch/oracle/apps/fnd/test/webui/DetailsPG&fname=”+fname.
Here fname is the variable we are passing to the DetailsPG.

138. How do we synchronize a EO and Table in the database?
Right click on the EO and click Synchronise.

139. How to set currency formatting in an OAF advance table region?
pageContext.getOANLSServcies().formatCurrency(num,”USD”);

140. How to call Concurrent Program in OAF?
public int submitRequest( String ProgramApplication ,String ProgramName ,String ProgramDescription ,String StartTime,boolean SubRequest,Vector Parameters ) throws RequestSubmissionException.

ProgramApplication -Application Short name of application under which the program is registered.
ProgramName – Concurrent Program Name for which the request has to be submitted.
ProgramDescription – Concurrent Program Description.
StartTime – Time at which the request should start running.
SubRequest – Set to TRUE if the request is submitted from another running request and has to be treated as a sub request.
Parameters – Parameters of the concurrent Request.

Example:
public int submitCPRequest(OAPageContext oapagecontext,OAWebBean oawebbean,Number headerId)
   {
OAApplicationModule am = oapagecontext.getApplicationModule(oawebbean);
   try {
   OADBTransaction tx = (OADBTransaction)am.getOADBTransaction();
   java.sql.Connection pConncection = tx.getJdbcConnection();
   ConcurrentRequest cr = new ConcurrentRequest(pConncection);
   String applnName = "PO"; //Application that contains the concurrent program
   String cpName = "POXXXX"; //Concurrent program name
   String cpDesc = "Concurrent Program Description"; // concurrent Program description
   Vector cpArgs = new Vector();     // Pass the Arguments using vector
   cpArgs.addElement((String)headerId);
   int requestId = cr.submitRequest(applnName, cpName, cpDesc, null, false, cpArgs);   // Calling the Concurrent Program
   tx.commit();
   return requestId;
   }
   catch (RequestSubmissionException e)
   {
   OAException oe = new OAException(e.getMessage());
   oe.setApplicationModule(am);
   throw oe;   }
   }




*/