Showing posts with label OAF. Show all posts
Showing posts with label OAF. Show all posts

Sunday, 26 July 2015

Reset Fields in a OAF Page

Whenever we click on Cancel button in the page, all the fields should be resetted to blank (NULL).

1) Enter the sample text in the page fields as below:



2) Click Cancel



3) Code to be written in the controller process form request method, since it is a post action once the page is loaded.

4) Sample code as below:

  public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
  {
    super.processFormRequest(pageContext, webBean);
       
    // All the user actions should be handled in the processFormRequest method.
    if (pageContext.getParameter("Cancel")!=null)
    {
      OAMessageTextInputBean OA = (OAMessageTextInputBean)webBean.findChildRecursive               ("WelcomeTxt"); // WelcomeTxt is the internal field name
      OA.setValue(pageContext,"");
      String message="Clear the input";
      throw new OAException(message,OAException.INFORMATION);
     }    
       
  }


Sunday, 7 June 2015

Getting Started with OAF!!

Download the Patch and Extract to the system.


Place the .dbc file to the appropriate folder.











Get the dbc file from the above path and place in below local path





Place the Jdeveloper.exe on the Desktop from p9879989_R12_GENERIC\jdevbin and click on the Jdeveloper.exe

Set the Database connection



Choose the Database folder from the Connections. Create a new Connection and provide the details to connect and Test the Connection!!





Set the Default Project Properties to automate at run time.




Create a New Workspace




Set the OA Workspace Path





Create a new Project



Create a new Application Module



Create a new Page



Set the Properties of a page



Run the Program. Right click on the page and click on run.



Output of sample page



BC4J Structure.