9 Replies Latest reply on Aug 27, 2013 6:03 PM by Mahesh112

    Getting error while navigating to next page

    ChinmayP

      Hi

       

      I am getting this error when i clicked on a button -

       

      You cannot complete this task because you accessed this page using the browser's navigation buttons (for example, the browser Back button).

       

      I have a requirement like this where i need to validate a input field which is on the next page.

       

      Here is my code, in which i have not written the logic.

       

      public class XxifmsOrderLinesTableRNCO extends OrderLinesTableRNCO

      {

        public void processRequest(OAPageContext pageContext, OAWebBean webBean)

        {

           super.processRequest(pageContext, webBean);

           System.out.println("in Process request");

        }

       

         public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)

           {

               super.processFormRequest(pageContext, webBean);

               System.out.println("in Process Form request");     

             }

           }

       

      It is printing "in Process request" only. not going to PFR.

       

      Please help.

        • 1. Re: Getting error while navigating to next page
          Srini-999

          Hi .

           

          ProcessRequest and ProcessFormRequest are two standard methods of

          controller.ProcessRequest is called just before rendering an OAF page

          and ProcessFormRequest is called when any event is generated on the

          page.For details please refer oaf developers' guide!

           

          Process Request while page loading it will execute.

          Process Form Request after page loading it will execute .

           

          for ex: After page loads we need some action like Button clicks or any event like.

           

          Regards,

          Srinivas

          • 2. Re: Getting error while navigating to next page
            ChinmayP

            Hi Srini,

             

            Thanks fr the reply.

            But can you please say why the error is coming ?

             

            Why the control is not going to processFormRequest.

            instead it is showing that error.

             

            Thanks

            • 3. Re: Getting error while navigating to next page
              Srini-999

              Hi
              Use any action

              For ex: in your scenario do u have any action like any button or action event items there means use below code ...

              public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)

                   { 

                                         super.processFormRequest(pageContext, webBean);

                              if("xxitem1".equals(pageContext.getParameter(EVENT_PARAM))){

               

                                               System.out.println("in Process Form request");     

                               }

              }

               

              Regards,

              Srinivas

              • 4. Re: Getting error while navigating to next page
                ChinmayP

                Hi Srini,

                 

                I have a requirement like this.

                I have a page where it need to search the ORDER value >> Next page the Searched values of Order come (if anything present)

                 

                Next is click on the ORDER value which will take me to the next page.  There you can find UPDATE (click on it) >> Next page it is LINE (click on it) >> Next page is a form (where i need to validate a input field) .

                 

                How i will write processFormrequest here as there are three task with three buttons on every individual page sharing the same document name.

                 

                UPDATE >>> Click >> Take you to LINE PAGE

                LINE >>> Click >> Take you to Form PAGE
                FORM PAGE >> Validate .

                 

                Now am trying with this to get rid of that errror.

                 

                public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)

                     { 

                                           super.processFormRequest(pageContext, webBean);

                                if("update".equals(pageContext.getParameter(EVENT_PARAM))){

                 

                                                 System.out.println("in Process Form request");     

                                 }

                }

                 

                Also anything i need to write in processRequest.

                 

                Thanks in Advance.

                • 5. Re: Getting error while navigating to next page
                  Srini-999

                  no use PFR Method  processFormRequest

                  • 6. Re: Getting error while navigating to next page
                    ChinmayP

                    Hi Srini.

                    Can you provide me with the code looking at the present requirement.
                    What to write in PFR ??

                     

                     

                    Thanks

                    • 7. Re: Getting error while navigating to next page
                      Srini-999

                      Use below codeXXXXX Replace the your Button Event here ur using Button means use below code

                       

                      public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)

                           { 

                                                 super.processFormRequest(pageContext, webBean);

                                      if("XXXXX".equals(pageContext.getParameter(EVENT_PARAM))){

                       

                                                       System.out.println("in Process Form request");     

                                       }

                      }

                       

                      or submit button means ..use below code xxxx replace the your button id

                      if(pageContext.getParameter(xxxx)!=null){

                         System.out.println("in Process Form request");     

                      }

                       

                      Regards,

                      Srinivas

                      1 person found this helpful
                      • 8. Re: Getting error while navigating to next page
                        ChinmayP

                        Hi Srini ,

                        I am still getting that error.

                        You cannot complete this task because you accessed this page using the browser's navigation buttons (for example, the browser Back button).


                        And it is not printing anything in the processFormRequest.


                        Please help.





                        • 9. Re: Getting error while navigating to next page
                          Mahesh112

                          hi try it:

                          UPDATE >>> Click >> Take you to LINE PAGE:

                           

                          in first page in PFR write

                          pageContext.putSessionValue("ProjectId", ProjectId);///anything that you want to carry till your last page and something unique

                          or you can use hashmap

                          if(pageContext,getParameter("update")!=null)

                          {

                          pageContext.setForwardURL("OA.jsp?page=/oracle/apps/dem/employee/webui/EmpDetails

                          PG",//your next page full path

                          null,

                          OAWebBeanConstants.KEEP_MENU_CONTEXT,

                          null,

                          null,

                          true, // Retain AM

                          OAWebBeanConstants.ADD_BREAD_CRUMB_YES, // Show breadcrumbs

                          OAWebBeanConstants.IGNORE_MESSAGES);

                          }

                          now next page:

                          LINE >>> Click >> Take you to Form PAGE

                          hete take value from session in PR

                          String var1=pageContext.getSessionvalue(ProjectId);

                          in PFR when user click on line again put some value in session that u need on net page and again forward to next page code is same as above


                          FORM PAGE >> Validate .

                          now on this page:

                          in PR take all values from session that you sending from previous page and put all your validation condition and show some OAexception messages.

                           

                          Let me know if you need any other information

                           

                          Regards

                          Mahesh