• Skip to primary navigation
  • Skip to main content

Tech Honey

The #1 Website for Oracle PL/SQL, OA Framework and HTML

  • Home
  • HTML
    • Tags in HTML
    • HTML Attributes
  • OA Framework
    • Item in OAF
    • Regions in OAF
    • General OAF Topics
  • Oracle
    • statement
    • function
    • clause
    • plsql
    • sql

execute vo in OA Framework

How to execute a VO on an OA Framework page load

October 28, 2012 by techhoneyadmin

Before telling you how to execute a VO on page load, I assume that you have your VO created and also have attached the VO to the correct AM (Application Module).

Now, let’s assume that the name of your VO is xxTrialVO and also the name of the AM is xxTrialAM.

Let’s take this stepwise for a better understanding.

Step 1 import the AMImpl into your controller attached to the OA Framework page.
To do this just write the following code.
import oracle.apps…..server.XXTrialAMImpl;
Note: the import path will be different for you and will depend on the folder structure that you have defined.

Step 2 import the VOImpl into your controller attached to the OA Framework page.

import oracle.apps…..server.XXTrialVOImpl;
Note: the import path will be different for you and will depend on the folder structure that you have defined.

Steps 3 before the starting of processRequest method create an instance of the xxTrialAMImpl as shown below.

public xxTrialAMImpl am;

Step 4 in the processRequest method you need to instantiate the application module.

am = (xxTrialAMImpl)pageContext.getApplicationModule(webBean);

Step 5 Now we need to create an instance of the xxTrialVOImpl and then execute it.
XXTrialVOImpl TrialVO = (XXTrialVOImpl)am.getXXTrialVO1();
TrialVO.executeQuery();

Thanks for reading.

Filed Under: OAF Miscellaneous Tagged With: execute vo in OA Framework, executeVO, how to execute a Vo

How to execute a VO on click of a button on an OAF page

October 28, 2012 by techhoneyadmin

Here we will discuss the execution of a VO on click of a submit button.

Now, before starting the discussion I assume that you have created a VO and have the same attached to AM. Also, I assume that you have imported the VOImpl and AMImpl to the controller attached to the page.
One more assumption I would like to make is that the VO name is xxTrialVo, AM name is xxTrialAm and the id of the submit button is xxSubmitButton.

After these assumptions, we are ready to learn how to execute a VO on click of a submit button.

First of all you need to check the click of the submit button. As submit button will post an HTTP request, hence you need to handle the click of the submit button in processFormRequest method. Just see the code below for reference.

if(pageContext.getParameter(“xxSubmitButton”)!=null)
{
pageContext.putSessionValue(“Click”,”Yes”);
pageContext.setForewardURLtoCurrentPage(//pass the required parameters);
}

Now the code above shows that you have caught the event of submit button click.
But our purpose was to execute the VO after submit button click, as we know that once the submit button is clicked the control travels from processFormRequst to processRequest method. Hence, now we will take the advantage of sessionValue that we have put in the code to check whether the control is coming back after submit button click or not. If it is then we will execute the VO.

In order to do this, in the processRequest method, refer to the code below.
if(“Yes”.equals(pageContext.getSessionValue(“Click”))
{
XXTrialVOImpl TrialVO = (XXTrialVOImpl)am.get XXTrialVO1();
TrialVO.executeQuery()
}

Hope you find this informative.
Thanks for reading 🙂

Filed Under: OAF Miscellaneous Tagged With: execute vo in OA Framework, executeVO, executing Vo on submit button click, how to execute a Vo, oa framework vo

Copyright © 2025 · Parallax Pro on Genesis Framework · WordPress · Log in