This discussion is archived
1 2 Previous Next 18 Replies Latest reply: Dec 19, 2012 1:05 AM by Arshad Hashmi RSS

Customer or Supplier form Extension.

Arshad Hashmi Newbie
Currently Being Moderated
HI,

I need to customize Customer and supplier form, but I am fresh in OAF. I have created and developed/deployed brand new OAF forms,
but I do not know the steps of OAF extension. If anyone knows, kindly share. sample steps, how can i open oracle xlm forms in jdeve to extent, and deploy in oracle.

thanks in advance.

Edited by: Arshad Hashmi on Dec 7, 2012 8:54 PM
  • 1. Re: Customer or Supplier form Extension.
    Sushant Sharma Expert
    Currently Being Moderated
    Hi,

    What is your exact requirement.. to do some personalization or want to extend controller class ?

    --Sushant                                                                                                                                                                                                                                       
  • 2. Re: Customer or Supplier form Extension.
    Arshad Hashmi Newbie
    Currently Being Moderated
    HI,

    I want to extent CO of create site. But I am confuse in how can in open forms on my desktop and deploy on Application after extension. Kindly clear my confusion.
  • 3. Re: Customer or Supplier form Extension.
    Sushant Sharma Expert
    Currently Being Moderated
    Hi,

    Follow these steps:

    1) Get the controller class file from server and save it to your local machine under myclasses folder followed by the package name like oracle/apps/...webui..
    2) From jDev, create a new java file extending from the class saved in step1. Create this file under xx/oracle/apps/..webui
    3) Write your logic in the new extended controller and compile that on the server.
    4) From front end, goto 'Personalize Page' and replace the standard controller name by your custom controller.

    --Sushant                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
  • 4. Re: Customer or Supplier form Extension.
    Arshad Hashmi Newbie
    Currently Being Moderated
    Thanks Sushant for very quick response, can you refer any doc with simple example (screen shot).
  • 5. Re: Customer or Supplier form Extension.
    Sushant Sharma Expert
    Currently Being Moderated
    Hi,

    You can refer below links:

    http://oracle.anilpassi.com/oa-framework-extending-controller-steps-2.html
    http://robertjungerius.blogspot.in/2010/08/extending-controller-in-oa-framework.html
    https://blogs.oracle.com/prajkumar/entry/controller_extension_in_oaf
    http://oracleanil.blogspot.in/2010/09/controller-extension-r12-oaf.html

    --Sushant                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
  • 6. Re: Customer or Supplier form Extension.
    Arshad Hashmi Newbie
    Currently Being Moderated
    Thanks Sushant, Kindly give you a coding hint.
    I want to extend CO, how can restricted user to create a new site if site already exist or open.
  • 7. Re: Customer or Supplier form Extension.
    Sushant Sharma Expert
    Currently Being Moderated
    Hi,

    Could you please elaborate your requirement i.e. at what step you want to restrict. On button click or something else?
    Provide complete navigation for the same as well.

    --Sushant                                                                                                                                                                                                                                                                                                                                                                                           
  • 8. Re: Customer or Supplier form Extension.
    Arshad Hashmi Newbie
    Currently Being Moderated
    Hi,

    When user goes to create customer site, and site already exist/enter, then user can not able to press “create site button” or if user press “create site button” then popup a error message.” You cannot create New Customer Site Because Site already exist”.

    Asrhad.
  • 9. Re: Customer or Supplier form Extension.
    Sushant Sharma Expert
    Currently Being Moderated
    Hi,

    Then extend your controller and write the logic in PFR method of custom CO:
    Catch the 'create site button' and check if site is already there using a sql query or getting results from VO used.
    If exists, then throw an OAException error message like 'Site already exists'.

    --Sushant                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
  • 10. Re: Customer or Supplier form Extension.
    Arshad Hashmi Newbie
    Currently Being Moderated
    Thanks ,i need your hlep in, how can get a attribute value in CO.

    I have a attribute 'Status Code' , i want to capture value of Status code and runtime. and dispaly on button press. thanks
  • 11. Re: Customer or Supplier form Extension.
    Sushant Sharma Expert
    Currently Being Moderated
    Hi,

    Firstly get the handle to root AM or AM used by that VO using:
    OAApplicationModule rootAm = pageContext.getRootApplicationModule();
    OAApplicationModule am = (OAApplicationModule)rootAm.findApplicationModule("nameOfAM");

    then get the VO:
    OAViewObject vo = (OAViewObject)am.findViewObject("nameofVO");

    You got the VO here, so now you can get rows and corresponding attributes that you want to use.

    --Sushant                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
  • 12. Re: Customer or Supplier form Extension.
    Arshad Hashmi Newbie
    Currently Being Moderated
    thanks ,But How can i tranfer extended CO into application ?
  • 13. Re: Customer or Supplier form Extension.
    Sushant Sharma Expert
    Currently Being Moderated
    Hi,

    You need to move the custom controller to $JAVA_TOP and from front end, using 'Personalize Page' link, replace the standard controller by your custom CO.

    --Sushant
    sushantsh51@gmail.com
  • 14. Re: Customer or Supplier form Extension.
    Arshad Hashmi Newbie
    Currently Being Moderated
    Hi,

    I have extended my controller but I am not successful to hold button press value, this is my code, kindly help me

    package xx.oracle.apps.per.selfservice.absence.webui;

    import oracle.apps.fnd.common.VersionInfo;
    import oracle.apps.fnd.framework.OAApplicationModule;
    import oracle.apps.fnd.framework.OAException;
    import oracle.apps.fnd.framework.OARow;
    import oracle.apps.fnd.framework.OAViewObject;
    import oracle.apps.fnd.framework.webui.OAPageContext;
    import oracle.apps.fnd.framework.webui.beans.OAWebBean;
    import oracle.apps.fnd.framework.webui.beans.form.OASubmitButtonBean;
    import oracle.apps.fnd.framework.webui.beans.nav.OAButtonBean;
    import oracle.apps.per.selfservice.absence.webui.AbsenceCreateCO;


    public class xxAbsenceCreateCOE extends AbsenceCreateCO {

    public xxAbsenceCreateCOE()
    {
    }

    public static final String RCS_ID = "$Header$";
    public static final boolean RCS_ID_RECORDED = VersionInfo.recordClassVersion("$Header$", "%packagename%");
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)

    super.processFormRequest(pageContext, webBean);
    OAApplicationModule rootAm = pageContext.getRootApplicationModule();
    OAApplicationModule am = (OAApplicationModule)rootAm.findApplicationModule("AbsenceAM");
    OAViewObject abVO = (OAViewObject)am.findViewObject("AbsenceVO");
    OASubmitButtonBean SB = (OASubmitButtonBean)webBean.findIndexedChildRecursive("Next");

    if(SB != null) // this line is not working
    {

    OARow abRow = (OARow)abVO.getCurrentRow();
    oracle.jbo.domain.Number abDays;
    abDays = (oracle.jbo.domain.Number)abRow.getAttribute("AbsenceDays");
    int s1 = 4;
    oracle.jbo.domain.Number var=new oracle.jbo.domain.Number(s1);

    // if (pageContext.getParameter("Next") != null) { 


    if (abDays!= null) {

    if(abDays.intValue() >= var.intValue()) {


    throw new OAException("Exception ", OAException.ERROR);

    }

    }


    if (abDays!= null) {

    if(abDays.intValue() <= var.intValue()) {


    throw new OAException("Information Your Absence Days " +abDays ,  OAException.INFORMATION);

    } } } }}


    pageContext.getParameter("Next") is also is not working.

    Edited by: Arshad Hashmi on Dec 18, 2012 4:23 AM
1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points