VO Extension in OAF



VO Extension

Now we are going to learn about how to extend the view object in OAF.

Step1:- Navigate to the page where you want to extend the view object.
            Analyze the page and note down in which region you want to extend.
            Click on about this page and note down the VO associated with that region.
            And also note down the path of the VO.

Step2:- Let us consider now we are extending the standard iProcurement page.

           

Now in My Requisition region in the existing table we are adding one more new column.
Note down the below details:-
VO Name:- MyReqsGlanceVO.
VO Path:- oracle.apps.icx.por.reqmgmt.server.MyReqsGlanceVO. (U will get the path of the VO in Business components section ).

Step3:- Get the corresponding files from the server $JAVA_TOP to local machine.

Step4:- Convert the class file to java file.

Step5:- Open the jDeveloper.
            Create the new workspace.
            Create one project
            Give the package name (VOExtension.oracle.apps.icx.por.reqmgmt.server)

Step6:- Right click on project select new
            ADF Business Components
            In that select View Object

            Name:-       (xxMyReqsGlanceVO)
            Package:-Give the package name (VOExtension.oracle.apps.icx.por.reqmgmt.server)
            Extends:-Brows the standard VO  (oracle.apps.icx.por.reqmgmt.server.MyReqsGlanceVO)

            Click on next

            

It will open the sql query window in that do the required changes according to the requirement.



            Don't forget to generate the java file
            After creating the extended view object compile the java files.

Step7:- Goto the project right click select project properties

           

             Business Components
             Substitutions
 In the substitution window select standard VO in left hand side and select custom VO on right hand side and click on ADD button.




Step8:- Move that newly created folder back to the server
            From C:\dev\oaf\r1211\jdevhome\jdev\myclasses
                        (the newly created VOExtension folder)
            To /oracle/apps/r12/visr12/apps/apps_st/comn/java/classes

Step9:- JAVA  import utility
            Open the command prompt

            change the directory to:-     C:\oaf\p9879989_R12_GENERIC\jdevbin\oaext\bin

            after that import the following:-

            make the fallowing path in a single line for that in notepad go format uncheck word
            wrap:-
           
jpximport C:\oaf\p9879989_R12_GENERIC\jdevhome\jdev\myprojects\VOExtension.jpx -username apps -password apps –dbconnection "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST= focusthreadr12.com)(PORT=1521))(CONNECT_DATA=(SID= visr12)))"



            C:\dev\oaf\r1211\jdevhome\jdev\myprojects\VOExtension.jpx   this the path where
             your jpx file located in your machine.

Step10:- To check the extension has done or not go to the sql developer execute the  
              following command

begin                                        
 jdr_utils.listCustomizations('/oracle/apps/icx/por/reqmgmt/server/MyReqsGlanceVO');       end;

            It will give the path.

Step11:- Bounce the Apache Web Server.

Step12:- Go to the front end go to the page which u want to extend.
Click on about this page. Expand all in business components check whether the extended VO  is reflecting or not.
 


Step13:- Do some personalization

            Add a new item of column type for the newly added filed.

            Add a new item for displaying the information.
            provide the required info

            View attribute of the new field
            View Instance (Give the standard View Instance name)

            Create one item for column header.



            That finishes the view object extension.

            Go back to the page and check the newly added field is appearing or not.






25 comments:

  1. Hi Sangu Patil,

    Thanks for the post its really helpful, But can you please explain the step 3 and 4 clearly. Because i get .class files from the server $JAVA_TOP to local machine, how should i convert the same to .java files is there any tools available to decomplie the files and after decompling the class files should i place all the files in myprojects folder ??

    Thanks,
    Vijay shankar BM

    ReplyDelete
    Replies
    1. Hi Vijay,

      Yes. There are lot of softwares to decompile the class file to java file. U have to install that.
      Then place all the files in myprojects folder.

      Regards,
      Sangu

      Delete
    2. Hi Sangu Patil,

      Thanks for the reply, I am using Class to java extractor as of now can you please suggest me any other software.

      Regards,
      Vijay shankar BM

      Delete
    3. Hi Vijay,

      I am using Cavaj java decompiler. It's also good.

      Regards,
      Sangu

      Delete
  2. There are many tools available for conversion of class file into java file. The most common used are CAVAJ which you can get free of cost

    ReplyDelete
  3. Hi
    I did VO extension and I can see the extension in backend.
    ex: /oracle/apps/icx/por/wf/server/customizations/site/0/AdvisoryWarningMessageVO
    But I could't find the extended VO name in the about this page, even after apache bounce.

    ReplyDelete
  4. I have used JAD to convert class file to Java

    ReplyDelete
  5. I have done the VO extension but getting the error

    oracle.apps.fnd.framework.OAException: oracle.jbo.NoDefException: JBO-25002: Definition eqxx.oracle.apps.icx.por.req.server.Eqxx_shopcart_PoRequisitionLinesVO of type View Definition not found
    at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1223)
    at oracle.apps.fnd.framework.webui.OAPageErrorHandler.processErrors(OAPageErrorHandler.java:1408)
    at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2680)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1683)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:509)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:430)
    at _oa__html._OA._jspService(_OA.java:84)


    Any suggestions please

    ReplyDelete
    Replies
    1. If this is 12.2 version and onwards before bounce you need to run adcgnjar command also.

      Delete
    2. Dear Sandeep, i did VO Extension as you explained and also adcgnjar in 12.2 4 , still getting error oracle.apps.fnd.framework.OAException: oracle.jbo.NoDefException: JBO-25058: Definition Remarks of type Attribute not found in PoNotifLinesSummaryVO at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1247)

      Delete
  6. what is the purpose of step 4 please

    Step4:- Convert the class file to java file.

    why we need this step??

    only XML file is mandatory but why class file in local machine

    ReplyDelete
  7. when i create view object in step 4/7 i have this error:

    each row in the query result columns must be mapped to a unique query attribute in the mapped entity columns

    any suggestion please !!

    ReplyDelete
    Replies
    1. Even i am facing the same issue as it is displaying 'each row in the query result columns must be mapped to a unique query attribute in the mapped entity columns'. Can anyone help with this issue?

      Delete
    2. Attribute creation not happened and as well as entity related radio button not selected during VO creation. If you press back button then you will find.

      Delete
  8. if 5 vo are there , then how do u find particular that vo is to be extention as requements ...

    ReplyDelete
  9. Is there any way to temporarily disable custom VOs without having to fully remove them? Sometimes when troubleshooting with Oracle Support we're asked to test the pages without customizations.

    ReplyDelete
    Replies
    1. Set the profile option 'Disable Self-Service Personal' to Yes. This will turn off all the personalizations.

      Hope this helps.
      Shilpi

      Delete
  10. Hi all,
    I have extended the VO ReqLinesNotificationsVO in PR approval notification page. i have added two more columns in the query and generated rowImpl , subtution files and migrated the code in to server everything is fine, but i am getting below while click on the notification. i have not changed any parameters or where clause.

    ## Detail 0 ##
    java.sql.SQLSyntaxErrorException: ORA-01722: invalid number

    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:462)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
    at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:931)
    at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:481)
    at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:205)
    at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:548)
    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:217)
    at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:947)
    at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1283)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1441)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3769)
    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3823)
    at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1671)
    at weblogic.jdbc.wrapper.PreparedStatement.executeQuery(PreparedStatement.java:135)
    at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:860)
    at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:669)
    at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3754)
    at oracle.jbo.server.OAJboViewObjectImpl.executeQueryForCollection(Unknown Source)
    at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQueryForCollection(OAViewObjectImpl.java:4591)
    at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:751)
    at oracle.jbo.server.ViewRowSetImpl.executeQueryForMasters(ViewRowSetImpl.java:900)
    at oracle.jbo.server.ViewRowSetImpl.executeQueryForMode(ViewRowSetImpl.java:814)
    at oracle.jbo.server.ViewRowSetImpl.executeQuery(ViewRowSetImpl.java:808)
    at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:3674)
    at oracle.apps.fnd.framework.server.OAViewObjectI
    [473]:UNEXPECTED:[fnd.framework.webui.OAPageErrorHandler]:pl.executeQuery(OAViewObjectImpl.java:439)
    at oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOImpl.initQuery(ReqLinesNotificationsVOImpl.java:111)
    at oracle.apps.icx.por.wf.server.ReqApprovalNotificationsAMImpl.initReqLinesNotfnVOQry(ReqApprovalNotificationsAMImpl.java:83)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    ReplyDelete
    Replies
    1. Hi, I am facing the same issue. Does your issue resolved. If so, could you please share with me. Thank you.

      Delete
  11. Very good article, nicely explained. Also Kudos to you for your time to posting such a nice blog and also answering questions new developer have on OAF.
    Regards

    ReplyDelete
  12. Hi, we are upgrading from 12.1.3 to 12.2.10 and user is modified the standard VO meaning no new custom file is created. what are the steps to be done in order to effect the same in 12.2.10.

    ReplyDelete
  13. Thanks for sharing. It is very useful article!!Mobilemall Bangladesh

    ReplyDelete