Infolinks

Sunday, 12 May 2013

OAF (SIMPLE_FORM_CREATION)


-----FORM CREATION IN OAF-----

NOTE: 1.SYSTEM NAVIGATOR
      2.STRUCTURE WINDOW
      3.BUSINILOGIC
      4.PROPERTY INSPECTOR
      5.LOG (PROGRAME LOG DETAILS)


1.FIRST WE SHOULD CREATE DATABASE IN CONNECTION

CONNECTION:
==========

  --HEAR TO GIVE DATABASE CONNECTION NAME

  --HEAR TO GIVE OUR ORACLE DB CONNECTION

     USERNAME:APPS
     PASSWORD:APPS
  --HEAR TO GIVE OUR ORACLE HOSTNAME & SYSTEM PORT NO
 
     HOSTNAME:apps.ora.com
     PORT NO:1521

     AND SID:vis

----HEAR TO TEST OUR DB CONNECTION IS WORK OR NOT

---FINALY OUR DB CONNECT IS SUCCESS AND FINISH IT

NOTE:THIS CONNECTION IS NOT NECESSARY TO CREATE EVERY TIME
     WE CAN USE THIS DB CONNECTION ALL OUR EVERY NEW CREATION OF PROJECTS(APPLICATIONS)

2.AND THEN GO FOR TO CREATE OUR NEW PROJECT IN APPLICATION NAVIGATION

APPLICATION NAVIGATION:
======================

1.HEAR FIRST WE SHOULD CREATE NEW WORKSPACE IN OUR APPLICATION

   APPLICATION
      |
       NEW OA WORKSPACE
  HEAR TO GIVE WORKSPACE FILENAME

  HEAR TO GIVE OUR PROJECT NAME & DEFOULT PACKAGE

   EX: PROJECT NAME:SURIOAProject1
       DEFOULT PACKAGE:xxsuri.oracle.apps.po.SURIOAProject1.webui

NOTE: HEAR PRJECT NAME & PACKAGE NAME SHOULD BE SAME
  
      HEAR THE PROJECT SAVE EXTENSION IS (webui)

2.HEAR THE CHECK BOX IS TO ENABLE AND SELECT TO CONNECT OUR DB CONNECTION

3.HEAR TO BROUSE OUR DBC FILE & TO GIVE USERNAME AND PASSWORD IN CONNECTION AND
  THEN ALSO TO GIVE APPLICATION SHORT NAME,RESPONSIBILITY KEY IN RESPONSIBILITY
 
   CONNECTION:
              DBC FILE:C:\OAF\jdevhome\jdev\dbc_files\secure\VIS.dbc
              USERNAME:operations
              password:welcome
   RESPONSIBILITY:
                 APPLICATION SHORT:PO
                 RESPONSIBILITY KEY:PURCHASING_OPERATIONS
NOTE: IT'S GIVE CAP'S ONLY

4. AND THE CLICK TO FINISH BUTTON
5.SO OUR WORKSPACE IS CREATED AND PROJECT ALSO CRATE
6.AND THEN WE NEED TO CREATE APPLICATION MODULE(AM)

     SURIOAProject1-->NEW-->ADF Business Components-->APPLICATION MODULE(AM)
        
7.HEAR TO CHANGE THE PACKAGE NAME webui TO server (BECOUSE OF IT'S A SERVER)
  AND TO GIVE APPLICATION MODULE NAME
   
    EX:SURIAppModule

8.AND CLICK ON NEXT-->NEXT TO FINISH
9.SO OUR APPLICATION MODULE IS CREATED
10 HEAR OUR APPLICATION SOURCE IS xxsuri.oracle.apps

11.THIS IS OUR APPLICATION MODULE

12. AND THEN TO CREATE ONE PAGE
  
         SURIOAProject1-->NEW-->OA Components-->PAGE

   HEAR TO GIVE PAGENAME
      EX:SURIpage1
 
13.AND THEN OUR PAGE IS CREATED

   HEAR AUTOMATICALLY ONE REGION1 IS CREATED
        
   HEAR WENEED TO SET THE REGION1-->PROPERTY INSPECTORE

REGION1-->PROPERTY INSPECTOR:
-----------------------------
         ID           : region1    // defoult
         RegionStyle  : pageLayout // defoult
         AM Definition: xxsuri.oracle.apps.po.SURIOAProject1.server.SURIAppModule //Brouse it
         Window Title : SURI APPS // OUR WISH NOTE: HEAR THE WINDOW TITLE IS MUST OTHER WISE WE GET                                                     ERROR
         TITLE        : ORDER INFO//OUR WISH

14.AND TEHN HEAR ALSO TO CRETATE ITEMS BUT THE POSITION IS NOT CURRECTLY DISPLAYED UNDER THE REGION1


NOTE : ONCE YOU HAVE TO RUN THE PROJECT
        
       THEN GO TO RIGHT CLICK AND RUN ON PAGE(SURIpage1) IN SYSTEM NAVEGATOR

       SO HEAR THE POSITION IS MIDLE , SO TO CREATE A NEW 2ND REGION2 UNDER THE REGION1

REGION2-->PROPERTY INSPECTOR:
-----------------------------
         ID : Messagecomponent // HEAR TO GIVE ONLY THIS ONE

15.AND THEN TO CREATE ITEM AS MessageTextInput UNDER THE REGION2

ITEM(ORDER_NUMBER)-->PROPERTY INSPECTOR:
-----------------------------------
         ID         :ORDER_N0
         ITEM STYLE :MessageTextInput
         PROMPT     :ORDER NO:

NOTE: HEAR THE POSITION IS MIDLE

16.AND THEN GO FOR BUTTONS TO CREATE BY USING MessageLayout

  NOTE:HEAR WE CONT'N CREATE BUTTONS UNDER ITEM(ORDER_NUMBER)
       HEAR WE CON'T GIVE ITEM STYL= SUBMIT BUTTON
   
      SO TO CREATE BUTTONS UNDER THE MessageLayout
      THIS MessageLayout IS TO CREATE UNDER THE REGION2

MessageLayout-->PROPERTY INSPECTOR: HEAR  NO CHANGES TO SET
-----------------------------------  

ITEM(GO)-->PROPERTY INSPECTOR:
------------------------------
         ID         :GO
         ITEM STYLE :SubmitButton
         PROMPT     :GO


ITEM(CLEAR)-->PROPERTY INSPECTOR:
------------------------------
         ID         :CLEAR
         ITEM STYLE :SubmitButton
         PROMPT     :CLEAR

17.AND THE DISPLAYING OF DATA IS DEPENDS ON REGION2(ORDER_NUMBER) IS TAKING TO ANOTHER REGION3
   UNDER REGION1

   NOTE: BEFORE GOING TO CREATE REGION3, TO CREATE VIEW OBJECT

18.SURIOAProject1-->NEW-->ADF Business Components-->View Object

   HEAR TO GIVE VIEW OBJECT NAME & CLICK TO ENABLE ( (.)READ-ONLY ACCESS)

   VIEW OBJECT NAME:SURI1ViewObj
        (.)READ-ONLY ACCESS

NOTE: HEAR TO PLACE ANY QUERY

      EX: SELECT HEADER_ID,CREATION_DATE
          FROM OE_ORDER_HEADERS_ALL
          WHERE ORDER_NUMBER=NVL(:P_ORDNO,ORDER_NUMBER)

      HEAR ALSO TO TEST QUERY
  AND HEAR BINDING STYLAE :ORACLE POSITIONAL
  AND ALSO HEAR TO GIVE THE "BINDING" STYLE IS "ORACLE POSITIONAL"

AND CLICK ON NEXT-->NEXT TO FINISH

AND THEN THE VIEW OBJECT IS CREATED


NOTE: HEAR WE NEED TO LINKUP THE APPLICATION MODULE(AM) & VIEW OBJECT(VO)

     DOUBLE CLICK ON AM AND MOVE THE AVAILABLE VIEW OBJECT(SURIViewOBJ) TO DATA MODAL
 
     AND THEN THE LINK IS CREATED

AND THEN TO CREATE REGION3 AND IT'S ITEMS UNDER THE REGION1

REGION3-->PROPERTY INSPECTOR:
-----------------------------
         ID              : region3 //DEFOULT
         REGION STYLE    : TABLE
         RECORDS DISPLAY : 10 // DEFOULT, WE CAN CHANG IT
         WIDTH           : 100 %

ITEM(HEADER ID)-->PROPERTY INSPECTOR:
-------------------------------------
         ID              :HEADER_ID
         ITEM STYLE      :MessageStyledText
         VIEW INSTANCE   :SURIViewOBJ1
         VIEW ATTRIBUTE  :HeaderId
         PROMPT          :HEADER ID

ITEM(CREATION DATE)-->PROPERTY INSPECTOR:
-------------------------------------
         ID              :CREATION_DATE
         ITEM STYLE      :MessageStyledText
         VIEW INSTANCE   :SURIViewOBJ1
         VIEW ATTRIBUTE  :HeaderId
         PROMPT          :CREATION_DATE
        

NOTE: AND THEN HEAR WE NEED TO CREATE CONTROLLER

    CONTROLLER: REGION1-->SET NEW CONTROLLER
 
               HEAR TO GIVE CONTROLLER NAME
                         EX:SURIMyCO

 AFTER CREATION OF CONTROLLER THE BUSINESS LOGIC IS OPENED
  HEAR TO BUILD SOME JAVA PROGRAM

NOTE:HEAR TO IMPORT SOME LOGIC TO AM


CREATIN LOV's
=============

TYPS OP LOV'S
-------------
    1. MESSAGE CHOICE
    2. MESSAGE LOV INPUT

1. MESSAGE CHOICE:
------------------

  AGAIN TO CREATE VIEW OBJECT FOR LOV's

  SURIOAProject1-->NEW-->ADF Business Components-->View Object

      HEAR TO GIVE 'POPLIST' IN PACKAGE          & CLICK TO ENABLE ( (.)READ-ONLY ACCESS)

                        |----------------------
                                               |

 PACKAGE:xxsuri1.oracle.apps.po.SURI1OAProject1.server

   EX:xxsuri1.oracle.apps.po.SURI1OAProject1.poplist.server

  AND GIVE VIEW OBJECT NAME:SURI1lovViewObj
                (.)READ-ONLY ACCESS

  NOTE: HEAR TO PLACE ANY QUERY

    EX: SELECT ORDER_NUMBER
        FROM OE_ORDER_HEADERS_ALL
        WHERE ORDER_NUMBER LIKE '4%'

      HEAR ALSO TO TEST QUERY
  AND HEAR BINDING STYLAE :ORACLE POSITIONAL
  AND ALSO HEAR TO GIVE THE "BINDING" STYLE IS "ORACLE POSITIONAL"

  AND CLICK ON NEXT-->NEXT TO FINISH

  AND THEN THE (LOV's)VIEW OBJECT IS CREATED

NOTE: HEAR NO NEED TO LINKUP THE APPLICATION MODULE(AM) & (LOV's)VIEW OBJECT(VO)

AND THE WE NEED TO CHANG SOME SETINGS IN ORDE_NO(ITEM) UNDER REGION1

ITEM(ORDER_NUMBER)-->PROPERTY INSPECTOR:
-----------------------------------
         ID              :ORDER_N0
         ITEM STYLE      :MessageChoice
         PICKLIST VIEW   :xxsuri1.oracle.apps.po.SURI1OAProject1.poplist.server.SURI1lovViewO
         PICKLIST DISPLAY:OrderNumber
         PICKLIST VALUE  :OrderNumber
NOTE: THIS ORDER NUMBER IS TO GET       IN (xxsuri1.oracle.apps.po.SURI1OAProject1.poplist.server.SURI1lovViewO(RightClick & Edit HEAR)
                                                                   |
                                                                  Edit SURI1lovViewO
                                                                     |
                                                                     Attribute
                                                                        |
                                                                        OrderNumber
                                                                         |
                                              AND TAKE HEAR ATTRIBUTE NAME:OrderNumber

                                                                    
         PROMPT          :ORDER NO:

AND THE LOV's ARE CREATED


xxdarani.oracle.apps.po.DARANI_OAProject1.poplist.server.DARANI_LOV_ViewObj


HIDE:
====

SELECT OOHA.HEADER_ID,OOHA.CREATION_DATE,OOLA.LINE_ID,OOLA.CREATION_DATE
FROM OE_ORDER_HEADERS_ALL OOHA,OE_ORDER_LINES_ALL OOLA
WHERE OOHA.HEADER_ID=OOLA.HEADER_ID
AND OOHA.ORDER_NUMBER=NVL(:P_ORDNO,OOHA.ORDER_NUMBER)

2. MESSAGE LOV INPUT
--------------------
1.FIRST WE SHOULD CREATE AM(APPLICATION MODULE),VO(VIEW OBJECT) AND THEN CREATE ONE EXTERNAL REGION.

  1.AM CREATION FOR MESSAGE LOV INPUT(LOV'S):
    -----------------------------------------

     SURIOAProject1-->NEW-->ADF Business Components-->APPLICATION MODULE(AM)

  HEAR TO CHANGE THE PACKAGE NAME (ADD THE NEW FOLDER LIKE EXT_LOV)

   PACKAGE: xxgsr7.oracle.apps.po.GSR7OAProject2.EXT_LOV.server

  AND TO GIVE APPLICATION MODULE NAME
   
    EX:EXT_LOV_AppModule

8.AND CLICK ON NEXT-->NEXT TO FINISH

  2.VO CREATION FOR MESSAGE LOV INPUP(LOV'S):
    -----------------------------------------

      SURIOAProject1-->NEW-->ADF Business Components-->View Object

   HEAR TO CHANGE THE PACKAGE NAME (ADD THE NEW FOLDER LIKE EXT_LOV)

   PACKAGE: xxgsr7.oracle.apps.po.GSR7OAProject2.EXT_LOV.server
  
NOTE: HEAR TO GIVE VIEW OBJECT NAME & CLICK TO ENABLE ( (.)READ-ONLY ACCESS)

    EX: VIEW OBJECT NAME:EXT_LOV_ViewObj
        (.)READ-ONLY ACCESS
     
 --HEAR TO GIVE THE QUERIE IS

    SELECT ORDER_NUMBER
    FROM OE_ORDER_HEADERS_ALL
    WHERE ORDER_NUMBER LIKE '4%'    

 HEAR ALSO TO TEST QUERY
  AND HEAR BINDING STYLAE :ORACLE POSITIONAL
  AND ALSO HEAR TO GIVE THE "BINDING" STYLE IS "ORACLE POSITIONAL"

AND CLICK ON NEXT-->NEXT TO FINISH

AND THEN THE EXT_LOV VIEW OBJECT IS CREATED

NOTE: HEAR WE NEED TO LINKUP THE EXT_LOV APPLICATION MODULE(AM) & EXT_LOV VIEW OBJECT(VO)

     DOUBLE CLICK ON AM AND MOVE THE AVAILABLE VIEW OBJECT(SURIViewOBJ) TO DATA MODAL
 
     AND THEN THE LINK IS CREATED

---AND THEN TO CREATE EXTERNAL REDION
 
     SURIOAProject1-->NEW-->OA Components-->Region

   HEAR TO GIVE REGION NAME

    EX:EXT_LOV_Region

    AND STYLE IS:list of values

--SO THE EXTERNAL REGION IS CREATED

--AND THEN WE NEED TO SET EXTERNAL REGIN PROPERTIES


EXTERNAL REGION(EXT_LOV_REGION1)-->PROPERTY INSPECTOR:
------------------------------------------------------
       SOURCE        :Public
       AM Definition :xxgsr7.oracle.apps.po.GSR7OAProject2.EXT_LOV.server.EXT_LOV_AppModule
 
--AND THEN GO FOR STRUCTURE WINDOW AND WE NEED TO SET THE GIVEN
  

--HEAR TO CREATE TABLE UNDER THE EXT_LOV_region1

--AND THEN TO CREATE ITEM1 UNDER THE EXT_LOV_region1

--AND THEN TO SET THE PROPERTIES IN ITEM1

ITEM1(EXTERNAL REGION)-->PROPERTY INSPECTOR:
--------------------------------------------

       ViewInstance  :EXT_LOV_ViewObj1
       ViewAttribute :OrderNumber


NOTE: THIS ORDER NUMBER IS TO GET       IN (xxsuri1.oracle.apps.po.SURI1OAProject1.poplist.server.EXT_LOV_lovViewObj(RightClick & Edit HEAR)
                                                                   |
                                                                  Edit SURI1lovViewObj
                                                                     |
                                                                     Attribute
                                                                        |
                                                                        OrderNumber
                                                                         |
                                              AND TAKE HEAR ATTRIBUTE NAME:OrderNumber


--AND THEN TO CHANGE SOME PROPERTIES IN ITEM(ORDER NO) UNDER THE REGION-2

ITEM(ORDER_NUMBER)-->PROPERTY INSPECTOR:
----------------------------------------
GENERAL:
         ID         :ORDER_N0
         ITEM STYLE :MessageLovInput
         PROMPT     :ORDER NO:
         ExternalLOV:/xxgsr7/oracle/apps/po/GSR7OAProject2/webui
FUNCTION:
         SORT ALLOWED   : ASENDING
         SELECT
         SEARCH CRITERIA:TRUE



--HEAR TO SET THE PROPERTIES
  
     Region2
        |
         ORDER
            |
           LOV Mapping
               |
              LOV MAP1

LOV MAP1(UNDER THE ORDER NUMBER)-->PROPERTY INSPECTOR:
------------------------------------------------------
  RETURN ITEM   :ORDER
  CREATION ITEM :ORDER

 NOTE: THIS ORDER IS ITEM_ID(ORDER NUMBER) UNDER THE REGION2




=================OAF CODE========================
SearchAMImpl am = (SearchAMImpl)pageContext.getApplicationModule(webBean);

if(pageContext.getParameter("GO")!=null) {
    String empno=pageContext.getParameter("EMPNO");
     am.xxcSearch(empno);
    }


if (pageContext.getParameter("CLEAR")!=null)
    {
    pageContext.forwardImmediatelyToCurrentPage(null,false,ADD_BREAD_CRUMB_NO);
    }



    public void xxcSearch(String empno) {
        SearchVOImpl vo=getSearchVO1();
     vo.setWhereClauseParam(0,empno);
     vo.executeQuery();
    }



--------------------------------------------------------------------------------------------------

*********************************CONTROLL OBJECT(GSRMyCO.java)*****************************


/*===========================================================================+
 |   Copyright (c) 2001, 2005 Oracle Corporation, Redwood Shores, CA, USA    |
 |                         All rights reserved.                              |
 +===========================================================================+
 |  HISTORY                                                                  |
 +===========================================================================*/
package xxgsr.oracle.apps.po.GSROAProject1.webui.webui;

import oracle.apps.fnd.common.VersionInfo;
import oracle.apps.fnd.framework.webui.OAControllerImpl;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;

import xxgsr.oracle.apps.po.GSROAProject1.server.GSRAppModuleImpl;

/**
 * Controller for ...
 */
public class GSRMyCO extends OAControllerImpl
{
  public static final String RCS_ID="$Header$";
  public static final boolean RCS_ID_RECORDED =
        VersionInfo.recordClassVersion(RCS_ID, "%packagename%");

  /**
   * Layout and page setup logic for a region.
   * @param pageContext the current OA page context
   * @param webBean the web bean corresponding to the region
   */
  public void processRequest(OAPageContext pageContext, OAWebBean webBean)
  {
    super.processRequest(pageContext, webBean);
  }

  /**
   * Procedure to handle form submissions for form elements in
   * a region.
   * @param pageContext the current OA page context
   * @param webBean the web bean corresponding to the region
   */
  public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
  {
    super.processFormRequest(pageContext, webBean);
      GSRAppModuleImpl am = (GSRAppModuleImpl )pageContext.getApplicationModule(webBean);
      if(pageContext.getParameter("GO")!=null) {
          String empno=pageContext.getParameter("ORDER ");
           am.xxcSearch(empno);
          }
      if (pageContext.getParameter("CLEAR")!=null)
          {
          pageContext.forwardImmediatelyToCurrentPage(null,false,ADD_BREAD_CRUMB_NO);
          }

  }
 

}

-----------------------------------------------------------------------------------------------

*********************** ApplicationModule(GSRAppModuleImpl.java)***************



package xxgsr.oracle.apps.po.GSROAProject1.server;

import oracle.apps.fnd.framework.server.OAApplicationModuleImpl;
// ---------------------------------------------------------------------
// ---    File generated by Oracle ADF Business Components Design Time.
// ---    Custom code may be added to this class.
// ---    Warning: Do not modify method signatures of generated methods.
// ---------------------------------------------------------------------
public class GSRAppModuleImpl extends OAApplicationModuleImpl {
    /**This is the default constructor (do not remove)
     */
    public GSRAppModuleImpl() {
    }

    /**Sample main for debugging Business Components code using the tester.
     */
    public static void main(String[] args) {
        launchTester("xxgsr.oracle.apps.po.GSROAProject1.server", /* package name */
      "GSRAppModuleLocal" /* Configuration Name */);
    }

    /**Container's getter for GSRViewObj1
     */
    public GSRViewObjImpl getGSRViewObj1() {
        return (GSRViewObjImpl)findViewObject("GSRViewObj1");
    }

    public void xxcSearch(String empno) {
        GSRViewObjImpl vo=(GSRViewObjImpl)getGSRViewObj1();
        vo.setWhereClauseParam(0,empno);
             vo.executeQuery();
           
    }
}

============================================

No comments:

Post a Comment