Login
Register

Home

Trainings

Fusion Blog

EBS Blog

Authors

CONTACT US

Retail Training Forum
  • Register

Oracle Gold Partners, our very popular training packages, training schedule is listed here
Designed by Five Star Rated Oracle Press Authors & Oracle ACE's.

webinar new

Search Courses

0
I need advise on the oaf extension requirement I have for purchasing -> buyer work center -> agreement screen.

Requirement is explained in the attachment document.

Summary: After clicking Submit button to create Agreement, custom dialog box required for user to take action. If yes on dialog box, create agreement else back to screen for user to change the supplier.

Please help me with suggestion, I am thinking of CO extension but not sure if it is the correct approach, will it work?

I need to do the extension on standard page not the custom page, Should I go for CO extension? and check if the parameter is Submit Button then create a dialog box, if user click yes what should I do, pass it to the super class of the CO and in cancel should I redirect to the same page?

Regards,
Sree
Responses (6)
  • Accepted Answer

    Wednesday, August 16 2017, 05:51 AM - #Permalink
    0
    Hi Sree,

    Below are sequence of steps that needs to be followed to implement the required functionality.

    Steps which needs to be followed to implement this requirement.

    1. Extend the CO and personalize the page with GO button and refer the extended CO.
    2. Capture the GO button event in the extended CO in ProcessFormRequest. ( Don't call the super.processFormRequest() , because that will create the PA).
    3. Use CallableStatement to call the package and pass the Supplier Details.
    4. Based on Yes/No returned from the package, write IF block.
    5. If the value returned is YES, then use the OADialogPage to show the Dialog Page( Refer Development guide for implementation of Dialog Pages)
    6. In the YES button click of OADialogPage, call the super.processFormRequest() to create the PA.
    7. In case NO button is clicked, you can either show a message on OAF Page, that Supplier does not qualify for PA or you can put some logging.
    8. Same thing you can do when the Package returns No/N in STEP-3.
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, August 16 2017, 06:31 AM - #Permalink
    0
    Thanks Sameer for detailed steps.

    Regards,
    Sree
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, August 16 2017, 09:30 PM - #Permalink
    0
    Hi Sameer,

    Step mentioned at 6 causing problem:
    6. In the YES button click of OADialogPage, call the super.processFormRequest() to create the PA.

    Here the problem is, once the button on dialog box is clicked, the pageContext changed and when it goes to super.processFormRequest(), (pageContext.getParameter("GO") != null) becomes false and not firing the actual submission of PA.

    Please suggest if you think there is any way to pass the parameter of "GO" to super class after accessing dialog box.

    Regards,
    Sree
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, August 17 2017, 11:18 AM - #Permalink
    0
    Hi Sree,

    Your processFormRequest() method will look like this


    public void processFormRequest()
    {


    if(pageContent.getParameter("Go")!=null)
    {
    "Create the OADialog Page"
    }

    if("When Yes button of OA Dialog is clicked" )
    {
    super.processFormRequest();
    }

    if( "When No button of OA Dialog is clicked")
    {
    "Do some logging> OR < Display a message on the Page"
    }

    }


    So on click of YES button of OA Dialog, it will not go inside the GO Button block, instead it will go in IF block where you have handled the YES button click.

    Hope this clarifies.
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, August 17 2017, 11:57 AM - #Permalink
    0
    Hi Sameer,

    I have tried this in sample tutorial, kind of :
    My extended code


    package xx.oracle.apps.fnd.framework.toolbox.labsolutions.webui;

    import java.io.Serializable;

    import oracle.apps.fnd.common.MessageToken;
    import oracle.apps.fnd.framework.OAApplicationModule;
    import oracle.apps.fnd.framework.OAException;
    import oracle.apps.fnd.framework.OAViewObject;
    import oracle.apps.fnd.framework.toolbox.labsolutions.webui.EmployeeCreateCO;
    import oracle.apps.fnd.framework.webui.OADialogPage;
    import oracle.apps.fnd.framework.webui.OAPageContext;
    import oracle.apps.fnd.framework.webui.OAWebBeanConstants;
    import oracle.apps.fnd.framework.webui.TransactionUnitHelper;
    import oracle.apps.fnd.framework.webui.beans.OAWebBean;

    import oracle.apps.fnd.framework.webui.beans.form.OASubmitButtonBean;

    import oracle.jbo.domain.Number;

    public class xxEmployeeCreateCO extends EmployeeCreateCO {

    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    {

    if (pageContext.getParameter("Apply") != null)
    {

    OAException mainMessage = new OAException("You are creating contract agrrement relationship with different supplier");
    OADialogPage dialogPage = new OADialogPage(OAException.WARNING,
    mainMessage, null, "", "");

    String yes = pageContext.getMessage("AK", "FWK_TBX_T_YES", null);
    String no = pageContext.getMessage("AK", "FWK_TBX_T_NO", null);

    dialogPage.setOkButtonItemName("DeleteYesButton");

    dialogPage.setOkButtonToPost(true);
    dialogPage.setNoButtonToPost(true);
    dialogPage.setPostToCallingPage(true);

    dialogPage.setOkButtonLabel(yes);
    dialogPage.setNoButtonLabel(no);
    //skipped the form value to pass
    pageContext.redirectToDialogPage(dialogPage);

    }
    else if (pageContext.getParameter("DeleteYesButton") != null)
    {
    super.processFormRequest(pageContext, webBean);
    }


    super.processFormRequest(pageContext, webBean);



    } // end processFormRequest()




    }


    But when I click the Yes button on dialog box it goes to super class oracle.apps.fnd.framework.toolbox.labsolutions.webui processFormRequest but if if skips the apply button logic from main class , so actual saving logic never fires.


    package oracle.apps.fnd.framework.toolbox.labsolutions.webui;

    ...

    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    {
    // Always call this first.
    super.processFormRequest(pageContext, webBean);

    OAApplicationModule am = pageContext.getApplicationModule(webBean);

    // Pressing the "Apply" button means the transaction should be validated
    // and committed.
    if (pageContext.getParameter("Apply") != null)
    {
    // Generally in the tutorial application and the labs, we've illustrated
    // all BC4J interaction on the server (except for the AMs, of course). Here,
    // we're dealing with the VO directly so the comments about the reasons
    // why we're obtaining values from the VO and not the request make sense
    // in context.
    OAViewObject vo = (OAViewObject)am.findViewObject("EmployeeCreateVO1");


    Regards,
    Sree
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, August 17 2017, 07:29 PM - #Permalink
    0
    Sree,

    You need to first understand the execution sequence of the methods in your extended controller.

    When you click YES button on the Dialog, then ProcessRequest() gets executed first, followed by the IF Statement of your ProcessFormRequest() where you are capturing the "Yes" button click.

    In your extended controller, have processRequest() method, which will call super.ProcessRequest(). This super.processRequest() should only get executed once, when u land on the extended controller page. When you click the Go button, set a parameter Temp='Y', whose value you should check in PR. This is to ensure, we don't execute super.ProcessRequest() again.

    PR()
    {
    if (Temp == null) {
    super.processRequest();
    }
    }

    This will ensure that your page does not get re initialize when YES button is clicked.

    Next, in your ProcessFormRequest(), you should only call super.ProcessFormRequest() once within the click of "YES" button.

    In your above code it is present at 2 places.

    I would suggest, put debug messages and see what all is executing in which order.
    • Sreejit Nair
      more than a month ago
      Hi Sammer,
      I added PR() in my extended CO and skipped the PR() call as you said but still it is not working.

      Issue is after a dialog box "yes" clicked when it goes to PFR() of main class it skips GO/Apply button parameter logic, I think it seems correct because once dialog box YES/NO clicked, GO /Apply button of main page will not be in the context unless if there is any ways to pass it.

      I have added the super.ProcessRequest() in the last so that it should execute irrespective of only go / apply button click to process like partial page rendering otherwise those logic will not work.

      I am not able to add reply to this discussion so adding it as comments
    The reply is currently minimized Show
Your Reply

Search Trainings

Fully verifiable testimonials

Apps2Fusion - Event List

<<  May 2024  >>
 Mon  Tue  Wed  Thu  Fri  Sat  Sun 
    1  2  3  4  5
  6  7  8  9101112
13141516171819
20212223242526
2728293031  

Enquire For Training

Fusion Training Packages

Get Email Updates


Powered by Google FeedBurner