This discussion is archived
7 Replies Latest reply: Oct 29, 2006 5:58 AM by TapashRay RSS

Processing Page Error

531800 Newbie
Currently Being Moderated
Hi,

Onclick of a SubmitButton in Page1 I want to invoke search and show the results in Page2.
Meanwhile,I want to show a Processing Page on the click of a button in Page 1 before showing the Page2.

On click of the button I see the Processing page but afetr few seconds I see an error page related to the processing page.

My Controller code is as follows

if(pageContext.getParameter("Go")!= null)
{
<< Search execution code>>


OAProcessingPage page = new OAProcessingPage("xyz.oracle.apps.cz.table.webui.UIExpCO");
page.setConciseMessage("This is a concise Messsage");
page.setDetailedMessage("This is a detail Message......");
page.setProcessName("Process Name -xyz ");
page.setProcessingText("Processing........abc..");
pageContext.forwardToProcessingPage(page);

pageContext.forwardImmediately("OA.jsp?page=/xyz/oracle/apps/cz/table/webui/UIExp2PG","",OAWebBeanConstants.KEEP_MENU_CONTEXT,null,null,true,OAWebBeanConstants.ADD_BREAD_CRUMB_YES);

}

Additional Questions related to processing Page
1.Should "Search invocation" follow the Processing page related code or be written before invoking the processing Page(as I have done)

2.Can I use "SetForwardToUrl" instead of "forwardImmediately"



Thanks,
Gowtam.
  • 1. Re: Processing Page Error
    TapashRay Newbie
    Currently Being Moderated
    What you have done is not correct implementation of the processing page.
    you should

    1. Launch the processing page from Page1 using pageContext.forwardToProcessingPage(page);

    2. In the processFormRequest of the controller of the processing page, start your long running process.

    3. Use pageContext.forwardImmediately to redirect to Page2, after step 2 in the controller of the processing page.

    Thanks
    Tapash
  • 2. Re: Processing Page Error
    531800 Newbie
    Currently Being Moderated
    Hi Tapash,

    I could not understand your solution clearly.
    Could you please validate my understanding and clarify these doubts..

    1. Launch the processing page from Page1 using pageContext.forwardToProcessingPage(page);
    - This line of code will be written in the Controller of Page 1?Is that right?

    2. In the processFormRequest of the controller of the processing page, start your long running process
    - How can I create a separate controller for processing page?
    - Are there 2 controllers now?One for Page1.and other for processing page?
    - The code to be executed on click of SubmitButton in Page1 should be written in the controller of Processing Page(as opposed to ProcessFmRqst() in Page1 controller)?


    3. Use pageContext.forwardImmediately to redirect to Page2, after step 2 in the controller of the processing page

    - This code will be written in the Controller of processing page?

    In short, On click of the SubmitButton in Page1, its controller will have only 1 line of code, that is invoking ProcessingPage?
    And Processing Page controller will handle SubmitButton click and forward to Page 2?

    Could you please resolve my confusion?



    Thanks,
    Gowtam.
  • 3. Re: Processing Page Error
    TapashRay Newbie
    Currently Being Moderated
    1. Launch the processing page from Page1 using pageContext.forwardToProcessingPage(page);
    - This line of code will be written in the Controller of Page 1?Is that right?
    Yes
    2. In the processFormRequest of the controller of the processing page, start your long running process
    - How can I create a separate controller for processing page?
    Just create a java file
    - Are there 2 controllers now?One for Page1.and other for processing page?
    Yes
    - The code to be executed on click of SubmitButton in Page1 should be written in the controller of Processing Page(as opposed to ProcessFmRqst() in Page1 controller)?
    Yes
    3. Use pageContext.forwardImmediately to redirect to Page2, after step 2 in the controller of the processing page
    - This code will be written in the Controller of processing page?
    Yes
    In short, On click of the SubmitButton in Page1, its controller will have only 1 line of code, that is invoking ProcessingPage?
    Yes
    And Processing Page controller will handle SubmitButton click and forward to Page 2?
    There wil be no button in the processing page, in the processFormReq of processing page, start your long running process followed by the code to redirect to Page2
    All this is very clearly explained in the devguide, with code.

    Thanks
    Tapash
  • 4. Re: Processing Page Error
    531800 Newbie
    Currently Being Moderated
    Hi Tapash.

    Thanks for the time spent to reply.
    I went through the developer's guide too. :-)
    I have 2 questions on creating controller for Processing Page.

    1.If I create a java file as Controller, should I edit it to look like a std controller (the one created when I say "Set New Controller" for a PagelayoutRN)..

    2.My long running process is a Manul Search.So, the input entered bt the user in Page 1 needs to be captured and has to be passed to processing page.How can I pass all inputs(i have 15) to Processing page.

    Thanks,
    Gowtam
  • 5. Re: Processing Page Error
    442947 Newbie
    Currently Being Moderated
    What do you mean by edit it as std controller ? The java file added when you click Set New Controller will be of the std controller format. You just need to go and write the code specified in the dev guide.

    For passing the parameters I have replied your other thread.
  • 6. Re: Processing Page Error
    531800 Newbie
    Currently Being Moderated
    Hi RamKumar,

    Thanks for the reply.I have replied to the other thread.
    I do not see Processing Page in System navigator as a separate file.So I can not do the following
    RighClick on PG and in the Context Menu, select "Set New Controller".

    What I have done(Tapash helped me) is Created a new Java file(General > Java Class).Then, I have made this class to extend OAControllerImpl and copied PR() and PFR().This is what I meant.Now Its working.Thanks to you and Tapash.

    Thanks,
    Gowtam






    Thanks,
    Gowtam.
  • 7. Re: Processing Page Error
    TapashRay Newbie
    Currently Being Moderated
    what you have done is correct, in fact that was the way we used to create controllers before the feature of set new controller came in.
    Thanks
    Tapash