7 Replies Latest reply: Feb 14, 2014 7:21 AM by sajid2 RSS

Navigating to parent form

sajid2 Explorer
Currently Being Moderated


Gurus,

Need some help. I must be missing something trivial in first OAF form.

 

I have a master search form (Form1) which then calls an Update form for the row chosen (Form 2).  On Form 2 are Update/Cancel buttons.  When I tested this on local machine, works perfectly.  However when I deployed it to the server, when I hit Update/Cancel, i get http 400.

 

Any thoughts will be appreciated.  here is the code snippet.

 

Form1 Controller:

 

    if ("updateEvent".equals(pageContext.getParameter(EVENT_PARAM))) {
           String p_header_id = pageContext.getParameter("p_header_id");
           String p_detail_id = pageContext.getParameter("p_detail_id");
           String s4 = pageContext.getCurrentUrlForRedirect();       // grab the current URL
           pageContext.putSessionValue("*previousPageUrlForList*", s4);  // store it

        
           HashMap hm = new HashMap();   //hashmap to pass to Update form
           hm.put("event", "update");
           hm.put("detail_id", p_detail_id);
           hm.put("header_id", p_header_id);
           hm.put("*previousPageUrlForList*", s4);
                        
          pageContext.forwardImmediately("OA.jsp?page=/xxap/oracle/apps/fnd/adv/webui/xxapInvUpdatePG",
                        null,
                        OAWebBeanConstants.KEEP_MENU_CONTEXT, null, hm, true,
                        OAWebBeanConstants.ADD_BREAD_CRUMB_NO);

 

Form2 Controller:

public void processFormRequest(OAPageContext pageContext,
    OAWebBean webBean) {
    super.processFormRequest(pageContext, webBean);
    OAApplicationModule am = pageContext.getRootApplicationModule();

    String detail_id = pageContext.getParameter("detail_id");
    String header_id = pageContext.getParameter("header_id");
    String valuefromsession =(String)pageContext.getSessionValue("*previousPageUrlForList*");
  

    // cancel button
    if (pageContext.getParameter("cancelBtn") != null) {             

        pageContext.writeDiagnostics(this, "Forwarding page context "+valuefromsession, 2);

        pageContext.forwardImmediately(
        valuefromsession,
        null,
        OAWebBeanConstants.KEEP_MENU_CONTEXT,
        null,
        null,
        true, // retain AM
        OAWebBeanConstants.ADD_BREAD_CRUMB_NO);

    }
  

   // Save Btn
    if (pageContext.getParameter("saveBtn") != null) {
    /*Here we are performing commit operation
    and returning back to search page.
    Also we are fetching the updated/created
    detail_id so we can display a message on search page*/
    am.invokeMethod("commit");

    pageContext.forwardImmediately(
             valuefromsession,
             null,OAWebBeanConstants.KEEP_MENU_CONTEXT,
             null,
             null,
             true, // retain AM
             OAWebBeanConstants.ADD_BREAD_CRUMB_NO);
    }

 

The search form was put up as a function and assigned to the correct menu.  I did not create a function for the Update form (Form2).

 

Deplyment was done correct with both xml for the pages being uploaded successfully and both are correctly calling.  I tried to force a page to be redirected in Form2 (Cancel btn) but it also landed up to http 400.

 

I must be missing something small and would appreciate any insights.

 

I have already tried pageContext.setForwardURL and same issue was observed when deployed but not on local machine.


Thanks

  • 1. Re: Navigating to parent form
    sajid2 Explorer
    Currently Being Moderated

    All. no feedback on this.

     

    I have revisited everything and everything is being done as per OAF documentation.

    I have verified the pages exist"

     

    set serveroutput on;

    BEGIN

    jdr_utils.printdocument('/testapp/oracle/apps/fnd/webui/Form1PG');

    end;

     

    set serveroutput on;

    BEGIN

    jdr_utils.printdocument('/testapp/oracle/apps/fnd/webui/Form2PG');

    end;

     

    OC4J was bounced as well as apache services.

     

    As noted before, i can get to Form2PG no problem. but it is when i click on save/cancel which invokes PageFormRequest.  There i just direct it to go back to the home page by specificing the original path.  In Developer mode, it works flawlessly but after deploying it, it fails with http 400 error.

     

    Any suggestions are welcome.

  • 2. Re: Navigating to parent form
    679137 Newbie
    Currently Being Moderated

    verify that you are giving the exact path while calling form2

  • 3. Re: Navigating to parent form
    sajid2 Explorer
    Currently Being Moderated

    Yes, i verfied that multiple times;

     

    For example: form function is calling the same path as what is being invoked via the return call in the

         OA.jsp?page=/xxap/oracle/apps/fnd/adv/webui/xxapInvoiceSearchPG

     

    $JAVA_TOP is where xxap exists as a subdirectory.

     

    From the menu, the form is launched correctly e.g goes to xxapInvoiceSearchPG. It performs the search and entire list of rows show up correctly.  I click on Update button towards the right and it navigates correctly to the form located below:

      called from first page.

              pageContext.forwardImmediately("OA.jsp?page=/xxap/oracle/apps/fnd/adv/webui/xxapInvUpdatePG",

                            null,

                            OAWebBeanConstants.KEEP_MENU_CONTEXT, null, hm, true,

                            OAWebBeanConstants.ADD_BREAD_CRUMB_NO);

     

    Now once in that form, if i choose cancelBtn or SaveBtn, it performs the below which means to go back to the original search screen. It works perfectly in local jdev environment in test but when deployed it says cannot find page.

     

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


                OAException confirmMessage1 =
                    new OAException("Update Cancelled",
                                    OAException.CONFIRMATION);
                pageContext.putDialogMessage(confirmMessage1);

                pageContext.setForwardURL("OA.jsp?page=/xxap/oracle/apps/fnd/adv/webui/xxapInvoiceSearchPG",
                                          null,
                                          OAWebBeanConstants.KEEP_MENU_CONTEXT,
                                          null, null, true,
                                          OAWebBeanConstants.ADD_BREAD_CRUMB_NO,
                                          OAWebBeanConstants.IGNORE_MESSAGES);

     

    In fact to prove the path is correct, i did the following, I created a second function which calls the Update form instead of the search form. I now go to the update form first and from there if i cancel or update, i do go to the search form (form 1),  This was to validate the path is valid.

     

    I am following exactly what OAF Guide tells us.  $JAVA_TOP is correct; I created a sub directory under it called xxap and hence the new forms are correctly residing.  Importer has pulled the correct form definitions as well.  I have bounced oc4j as well apache services and still issue persists.  It is as though it does not know where the path is.

  • 4. Re: Navigating to parent form
    sajid2 Explorer
    Currently Being Moderated

    Any suggestions any one?

  • 5. Re: Navigating to parent form
    sajid2 Explorer
    Currently Being Moderated

    Tracing back and it appears to be a configuration issue in apache. testing the changes as it is isolated to R12.1.3 environment.

     

    s_limitrequestfieldsize, s_limitrequestline, s_limitrequestfields

     

    Will post if this works.

  • 6. Re: Navigating to parent form
    sajid2 Explorer
    Currently Being Moderated

    Did not work. Went back to apache.log it is pattern match bug.

     

    [Fri Jan 24 11:17:25 2014] [error] [client 28.1.6.95] mod_security: Access denied with code 400. Pattern match "!^([-_|#!=A-Za-z0-9/ :,.$()]){0,255}([-_|#!=A-Za-z0-9/ :,.$()]){0,255}$" at ARGS_NAMES. [hostname "bhap0008.corp.pep.pvt"] [uri "/OA_HTML/OA.jsp?

     

    Any suggestions?

     

  • 7. Re: Navigating to parent form
    sajid2 Explorer
    Currently Being Moderated

    Issue resolved.  The issue lies in security conf and there is a declaration on ARGS_NAME.  Remove security.conf from httpd.conf and follows the steps below.

     

     

    1.Please stop the services

    2. Backup $ORA_CONFIG_HOME/10.1.3/Apache/Apache/conf/httpd.conf

    3. comment out the following line

    include "/..../.../.ora/10.1.3/Apache/Apache/conf/security.conf"

    After commenting it should look similar to this

    #include "/..../.../.ora/10.1.3/Apache/Apache/conf/security.conf"


    4. Restart the services and retest the issue

Legend

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