ADF how to display a processing page when executing large queries

ADF how to display a processing page when executing large queries
The ADF application that I have written currently has the following structure:
DataPage (search.jsp) that contains a form that the user enters their search criteria --> forward action (doSearch) --> DataAction (validate) that validates the inputted values --> forward action (success) --> DataAction (performSearch) that has a refresh method dragged on it, and an action that manually sets the itterator for the collection to -1 --> forward action (success) --> DataPage (results.jsp) that displays the results of the then (hopefully) populated collection.
I am not using a database, I am using a java collection to hold the data and the refresh method executes a query against an Autonomy Server that retrieves results in XML format.
The problem that I am experiencing is that sometimes a user may submit a query that is very large and this creates problems because the browser times out whilst waiting for results to be displayed, and as a result a JBO-29000 null pointer error is displayed.
I have previously got round this using Java Servlets where by when a processing servlet is called, it automatically redirects the browser to a processing page with an animation on it so that the user knows something is being processed. The processing page then recalls the servlet every 3seconds to see if the processing has been completed and if it has the forward to the appropriate results page.
Unfortunately I can not stop users entering large queries as the system requires users to be able to search in excess of 5 million documents on a regular basis.
I'd appreciate any help/suggestions that you may have regarding this matter as soon as possible so I can make the necessary amendments to the application prior to its pilot in a few weeks time.

Hi Steve,
After a few attempts - yes I have a hit a few snags.
I'll send you a copy of the example application that I am working on but this is what I have done so far.
I've taken a standard application that populates a simple java collection (not database driven) with the following structure:
DataPage --> DataAction (refresh Collection) -->DataPage
I have then added this code to the (refreshCollectionAction) DataAction
protected void invokeCustomMethod(DataActionContext ctx)
super.invokeCustomMethod(ctx);
HttpSession session = ctx.getHttpServletRequest().getSession();
Thread nominalSearch = (Thread)session.getAttribute("nominalSearch") ;
if (nominalSearch == null)
synchronized(this)
//create new instance of the thread
nominalSearch = new ns(ctx);
} //end of sychronized wrapper
session.setAttribute("nominalSearch", nominalSearch);
session.setAttribute("action", "nominalSearch");
nominalSearch.start();
System.err.println("started thread calling loading page");
ctx.setActionForward("loading.jsp");
else
if (nominalSearch.isAlive())
System.err.println("trying to call loading page");
ctx.setActionForward("loading.jsp");
else
System.err.println("trying to call results page");
ctx.setActionForward("success");
Created another class called ns.java:
package view;
import oracle.adf.controller.struts.actions.DataActionContext;
import oracle.adf.model.binding.DCIteratorBinding;
import oracle.adf.model.generic.DCRowSetIteratorImpl;
public class ns extends Thread
private DataActionContext ctx;
public ns(DataActionContext ctx)
this.ctx = ctx;
public void run()
System.err.println("START");
DCIteratorBinding b = ctx.getBindingContainer().findIteratorBinding("currentNominalCollectionIterator");
((DCRowSetIteratorImpl)b.getRowSetIterator()).rebuildIteratorUpto(-1);
//b.executeQuery();
System.err.println("END");
and added a loading.jsp page that calls a new dataAction called processing every second. The processing dataAction has the following code within it:
package view;
import javax.servlet.http.HttpSession;
import oracle.adf.controller.struts.actions.DataForwardAction;
import oracle.adf.controller.struts.actions.DataActionContext;
public class ProcessingAction extends DataForwardAction
protected void invokeCustomMethod(DataActionContext actionContext)
// TODO: Override this oracle.adf.controller.struts.actions.DataAction method
super.invokeCustomMethod(actionContext);
HttpSession session = actionContext.getHttpServletRequest().getSession();
String action = (String)session.getAttribute("action");
if (action.equalsIgnoreCase("nominalSearch"))
actionContext.setActionForward("refreshCollection.do");
I'd appreciate any help or guidance that you may have on this as I really need to implement a generic loading page that can be called by a number of actions within my application as soon as possible.
Thanks in advance for your help
David.

Similar Messages

  • How to display list process, when i run sql*loader in c#

    Hello,
    How to display list process, when i run sql*loader in c#. I mean when i run sql*loader from cmd windows, i get list process how many row has been inserted. But when i run SQL*Loader from C#, i can't get process SQL*Loader.
    This is my code:
    string strCmd, strSQLLoader;
    string strLoaderFile = "XLLOAD.CTL";
    string strLogFile = "XLLOAD_LOG.LOG";
    string strCSVPath = @"E:\APT\WorkingFolder\WorkingFolder\sqlloader\sqlloader\bin\Debug\8testskrip_HTTP.csv";
    string options = "OPTIONS (SKIP=1, DIRECT=TRUE, ROWS=1000000,BINDSIZE=512000)";
    string append = "APPEND INTO TABLE XL_XDR FIELDS TERMINATED BY ','";
    string table = "OPTIONALLY ENCLOSED BY '\"' TRAILING NULLCOLS (xdr_id,xdr_type,session_start_time,session_end_time,session_last_update_time,session_flag,version,connection_row_count,error_code,method,host_len,host,url_len,url,connection_start_time,connection_last_update_time,connection_flag,connection_id,total_event_count,tunnel_pair_id,responsiveness_type,client_port,payload_type,virtual_type,vid_client,vid_server,client_addr,server_addr,client_tunnel_addr,server_tunnel_addr,error_code_2,ipid,c2s_pkts,c2s_octets,s2c_pkts,s2c_octets,num_succ_trans,connect_time,total_resp,timeouts,retries,rai,tcp_syns,tcp_syn_acks,tcp_syn_resets,tcp_syn_fins,event_type,flags,time_stamp,event_id,event_code)";
    strCmd = "sqlldr xl/secreat@o11g control=" + strLoaderFile + " LOG=" + strLogFile;
    System.IO.DirectoryInfo di;
    try
    System.Diagnostics.ProcessStartInfo cmdProcessInfo = new System.Diagnostics.ProcessStartInfo("cmd.exe");
    di = new DirectoryInfo(strCSVPath);
    strSQLLoader = "";
    strSQLLoader += "LOAD DATA INFILE '" + strCSVPath.ToString().Trim() + "' " + append + " " + table;
    StreamWriter writer = new StreamWriter(strLoaderFile);
    writer.WriteLine(strSQLLoader);
    writer.Flush();
    writer.Close();
    // Redirect both streams so we can write/read them.
    cmdProcessInfo.RedirectStandardInput = true;
    cmdProcessInfo.RedirectStandardOutput = true;
    cmdProcessInfo.UseShellExecute = false;
    cmdProcessInfo.LoadUserProfile = true;
    //System.Diagnostics.Process.Start("CMD.exe", strCmdLine);
    // Start the procses.
    System.Diagnostics.Process pro = System.Diagnostics.Process.Start(cmdProcessInfo);
    // Issue the dir command.
    pro.StandardInput.WriteLine(strCmd);
    // Exit the application.
    pro.StandardInput.WriteLine("exit");
    //Process[] processlist = Process.GetProcesses();
    //foreach(Process pro in processlist){
    Console.WriteLine("Process: {0} ID: {1}", pro.ProcessName, pro.Id);
    Console.WriteLine(pro.StandardOutput.ReadLine());
    // Read all the output generated from it.
    string strOutput;
    strOutput = pro.StandardOutput.ReadToEnd();
    pro.Dispose();
    catch (Exception ex)
    return;
    finally
    Thanks.

    friend
    sqlldr is an application residing in the OS. procedure runs in the dbms engine.
    you cannot run an os command directly from a procedure or a function or a package .
    If you want to do so you need to use either a daemon process created by a PRO*C program
    or a JAVA stored procedure to do so.
    just refer to previous question forums, you can find the solution. Somebody has already given a solution using
    java to run an OS command . check it out
    prakash
    [email protected]

  • How to avoid submitting a page when tabular form rows are empty

    Hi,
    I have a master detail form in my application. There are 2 tables that are used Table A and Table B. Table A contains Ticket number and Table B refers to Table A through a foriegn key and Table B have columns like Date,Name, Age, ticket_id (that refers to the ticket_number of the Table A).
    This is how the application works:
    In a page there is a field for Ticket Number, once the user enters the Ticket Number and click Add Details, a tabular Form with 5 empty field appears... (Done through Page Process->Data Manipilation->Add Rows)
    This form contains fields Date, Name and Age. Once the user fills in all the details and click Submit button, the page is submitted. Whatever values that was entered is saved in Table B. Page Sucess message appears. This works fine.
    But once the Ticket Number is entered and Add Details is clicked, and without entering the values in the Tabular Form, if Submit button is clicked, there is no error showing up neither I see Page success message. But this should not be allowed. There should be some error showing up...
    Tabular Form Validations works only when user enters some values in the Tabular Form and click Submit. For the above scenario, where the form is untouched the validation doesnt work.
    How can I get this done? Any ideas?

    Hello Suzi,
    >> if (document.wwv_flow==null)
    The document.wwv_flow is an object representing the current form that was just rendered on your screen. As such, it can never be null.
    >> How to avoid submitting a page when tabular form rows are empty
    The correct way, especially for versions prior to APEX 4.0 is to use JavaScript, but for that, you need to know and understand how APEX generates your tabular form, HTML wise.
    To be very brief, APEX attached a unique ID to every updatable cell in the tabular form, using a certain pattern – each updatable column is getting a unique name (e.g. ‘f01’,’f02’ etc.) and the ID of a cell is a combination of this name with the serial row number the cell is on. For example, a cell on the third row in an updatable column called ‘f04’ will be given an ID of f04_0003. (More detailed explanation, with an example, can be found in my book).
    What you should do is to check these cells according to your validation policy (e.g. is all five row must be filled, is all the columns in a specific row must be filled, etc.).
    Regards,
    Arie.
    ♦ Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
    ♦ Author of Oracle Application Express 3.2 – The Essentials and More

  • How to stop a process chain when its running?

    Dear Experts,
    How to stop a process chain when its running? is it that a chain can be stoppend when we open an info package of that chain ?
    Thank you,
    Raj

    Hi,
    Goto the main menu process chain --> choose the remove from the Schudule...
    Regards
    sathis
    I hope it helps to u... please assign the points

  • To display the same page when an error occurs.

    Hi,
      I need to display the same page when an error occurs in the page. For example, I am validating a few fields in a page. If an error occurs, then same page is to be displayed.
      I am presently using MVC type programming.
    Thanks in advance.
    Regards,
    Vara

    I usually use the Message class, for handling all possible validations. In the DO_HANDLE_DATA, do the validation, and if your validation fails, put your message in the message attribute available for that method. As you have not given a pointer to a new page, it will refresh that same page.
    If your validation is successful, go to next page.
    In the layout of this page(where you require validation), there is an attribute called page and it has get_message method. Call that method at the appropriate place in the layout.
    For more information , refer to :
    http://help.sap.com/saphelp_470/helpdata/en/91/b197ce280011d5991f00508b6b8b11/frameset.htm
    Web Applications and BSP --> Programming Environment -->
    Handling Incorrect Entries
    Let us know, if this answered your query.
    Regards,
    Subramanian V.

  • How to display a double page of a magazine with ibooks

    how to display a double page of a magazine with ibooks ?
    Thanks

    oiram osurac wrote:
    how to display a double page of a magazine with ibooks ?
    What is the title of the magazine you are talking about?

  • How to stop a process (that is executing)

    Hi all
    my question is How to stop a process that is executing ?
    some other languages has a function called yield() in java how I can do it.
    thanks

    You can tell a Thread to yield - That is, cause the currently executing thread object to temporarily pause and allow other threads to execute.

  • How can I display the same page when I'll press

    i have a jsp page. It contains user name & password.
    and a link like SIGNOUT COMPLETELY. when i press the back button it should show only this page.
    You have noticed one thing that when u sign out from YHAOO MAIL then a page is displayed
    USERNAME : [email protected]
    PASSWORD :XXXXXXXXXX
    SIGNOUT COMPLETELY
    when this page is dispalyed and u press the back button of the browser
    it displays the same page. How it happens?

    Kindly neglect the previous post.....
    Okay check something like this
    1).maintain either a HttpSessionListener or a session flag try to checkout whether the user is active or else close the PrintWriter.
    2).Prevent caching of the webpage by using customary meta tag or by response,setHeader("Cache-Control","no-cache");
    way...
    Guess tht shud work.....

  • How to display a website page in a JSP textarea ?

    Hi all...
    I am developing an application where i need to display a web page in a text area, the same
    way it gets displayed in a web browser (like IE, mozilla). After that i will read the page and will extract text from it for further processing.
    My JSP contains a text field where i can type the URL address (say http://www.yahoo.com)
    What i want is, when i will click a submit button, the web page at the given URL should be retrieved and should get displayed in the textarea that is present on the same page. (It should be displayed in the same way as it
    gets displayed on the browser.)
    Is that possible ? Can it be done using some other ways ?
    It is a small application that i am developing using struts 1.1.
    Can some one help in this regard ?
    Thanks in advance..
    Regards
    Prasad

    Thanks BalusC..
    I have used iframe now and it is working for the URL specified.
    But even then i have couple of doubts..
    1. How should i use the iframe if i want to navigate on the further web pages within the same frame ?
    (e.g. if with URL say http://www.yahoo.com, the home page is displayed in the frame, now if i click any link
    on the page the next navigation should occur within given frame only.)
    2. Can i read the page from the frame and write the text into some file say text file ?
    Hope you understand my problem...
    Thanks a lot..
    Prasad

  • Unable to display SSHR Review Page when I click on a URL in a Notification

    Hi,
    We have a requirement to display the Review Page of the Employee Self Service Manage Payroll Payments function in a notification. I have copied the original seeded workflow process and added the notification step. However, when the notification is generated and the link to view the Review page is clicked, we are receiving an error. Why is this? Is this a bug? We have defined the function and workflow attributes correctly.
    The message has an attribute called 'Click here to view bank account details'. That attribute has a value of :
    JSP:/OA_HTML/OA.jsp?akRegionCode=PAY_PAYMENTS_REVIEW_SS&akRegionApplicationId=800&OAFunc= XXTEST_PAY_EMP_PAYMENTS&NtfId=-&#NID-&retainAM=Y
    When I click on the URL in the notification the error page says *'ERROR: Cannot Display Page'* and has the following url in the address bar:
    https://erp1.theglobalfund.org/OA_HTML/OA.jsp?akRegionCode=PAY_PAYMENTS_REVIEW_SS&akRegionApplicationId=800&OAFunc=%20XXTEST_PAY_EMP_PAYMENTS&NtfId=244856&retainAM=Y&dbc=DTGFUI&transactionid=801240504&oapc=24&oas=s1HtmV0oSaQRqDRTjyQ3fg..
    Can somebody please advise. I also have a .doc with full details of setup done but cannot see how to attach it to this thread message.
    Thanks,
    Mark.

    No, that was not the answer. Yes I had a space in the URL, but when I removed the space I still get the same error:
    Error: Cannot Display Page
    You cannot complete this task because one of the following events caused a loss of page data:
    Your login session has expired.
    A system failure has occurred.
    This is the URL in the window:
    https://erp1.theglobalfund.org/OA_HTML/OA.jsp?akRegionCode=PAY_PAYMENTS_REVIEW_SS&akRegionApplicationId=800&OAFunc=XXTEST_PAY_EMP_PAYMENTS&NtfId=250834&retainAM=Y&dbc=DTGFUI&transactionid=757523217&oapc=27&oas=0W2JZORcKVD83Md4LxaXsQ..
    NOTE: When I have the attribute value as the following (with no akRegionCode parameter) the Manage Payroll Payments screen opens in a new window...just not the review page of that function :
    JSP:/OA_HTML/OA.jsp?&akRegionApplicationId=800&OAFunc=XXTEST_PAY_EMP_PAYMENTS&NtfId=-&#NID-&retainAM=Y
    So it seems to be something to do with displaying that region parameter and value : akRegionCode=PAY_PAYMENTS_REVIEW_SS
    Can somebody please help?
    Thanks.
    Edited by: user12053943 on Jul 6, 2010 6:33 AM

  • How to display a IE page in a view ,not popup  ?

    Hi! All
    Question 1st:
    I have create a html page by webdynpro,
    I want display this page in a view ,
    but when run this code,
    the IE page popup ,
    can you help me set the IE page in current view ?
    public void wdDoInit()
       //@@begin wdDoInit()
       String text = "<html><head></head><body>this is my test</body><html>";
       try
           IWDCachedWebResource resource = WDWebResource.getWebResource
             text.getBytes("UTF-8"), WDWebResourceType.UNKNOWN
            resource.setResourceName("test.html");
            IWDWindow window =
    wdComponentAPI.getWindowManage().createNonModalExternalWindow(
            resource.getUrl(WDFileDownloadBehaviour.OPEN_INPLACE.ordinal()), 
            resource.getResourceName());
            window.show();
        catch(Exception ex)
            wdComponentAPI.getMessageManager().reportException( new WDNonFatalException(ex), false );
    Question 2nd:
      I have create a value context attribute under context.
      it's  name is "mywindow"
      it's  type is "com.sap.tc.webdynpro.services.session.api.IWDWindow"
      Do you know how to display  "mywindow" in a view ?
      I try to put mywindow in a InputField or a IFrame,
      but all failed !
    Thanks!

    Hi,
    This is the code to open up a window
        IWDWindow win = wdComponentAPI.getWindowManager().createModalWindow(wdThis.wdGetAPI().getComponentInfo().findInWindows(<window_name>));
        wdContext.currentContextElement().set<window_context>(win);
        win.setWindowPosition(WDWindowPos.CENTER);
        win.setWindowSize(250,150);
        win.setTitle("New Window");
        win.show();
    This will open up as a pop-up. If you want to open a html page on the same window then put an iframe in your view and set its source property correspondingly.
    Regards,
    Murtuza

  • How to display the master TOC when using Context help in a merged document

    I use Robohelp 10. I have created a large Merged Webhelp project and I have set out the project master with nothing in it other than merged projects place markers.
    This is the layout of the generated projects etc.
    Generate
              Master.htm
                   Redirect.htm  (Home page is a redirect to Project 1 Home Page - not in TOC)
    mergedProjects
              Project1
                  Home Page.htm
              Project2
                   Redirect.htm  (Home page is a redirect to Project 1 Home Page - not in TOC)
              Project3 etc.
                    Redirect.htm  (Home page is a redirect to Project 1 Home Page - not in TOC)
    I can get the help to work great when I call up the master page, which shows the TOC for the whole project and the default home page. And from the breadcrumb the home link goes to the home page and shows the Main TOC
    However when I call a page using context help ID I get a single frame with the selected page. The link to show the TOC shows the TOC but it is the top of the merged project and not the master TOC. The home link in the does display the home page but again the displayed TOC is the one of the current merged project.
    The question is :
    How can I get the Master TOC to show all the time regardless of what page I call using a context ID or how can I create a link that will take me back to the Master TOC?
    I remember when I created a previous help file for chm output I had to modify all the ali files in order for the redirect to work throught the master chm. Surely this is not the case with webhelp?
    TonyC

    I am sorry that I didn't get back to all you guys that took to answering my very promptly. Unfortunately I was not in a position to answer to the suggestions made. as I was away from my computer which had Robohelp on.
    Anyway, I did try a couple of scripts mentioned, but didn't really have any success i achieving what I need to do.
    I set up a redirect which redirected to the main home page. I tried setting the home page in a  main sub-project - so the redirect when from any sub project
    Generate
         Master-project.htm (Home Page = Help_Welcome.htm)
    merged Projects
    SubProject1
                [Home Page =  home_redirect.htm (a redirect see below) ]
         SubProject 2
                [Home Page =  home_redirect.htm (a redirect see below) ]
         SubProject 3
                [Home Page =  home_redirect.htm (a redirect see below) ]
    home_redirect.htm  (a redirect use by sub-topics)
    <!--
       window.location="../../ Help_Welcome.htm ";
    //-->
    //]]></script>
    This setup works fine as long as I call the master page. The TOC is as I would want. However if I call an ID from my application I get the required page to display and I can get the TOC to show. The problem is that the TOC is from the current sub-project and not the master project as I would want.

  • How to display a web page in kannada language

    Hi
    we are designing a web (html)page
    how to display that page in kannada language
    we downloaded "brhknd.ttf" font file.
    if this file is available in SYSTEMS-Control Panel-Font folder it is working .if it is not their in System's directory the web page is not displaying kannada language.
    All the client's machines wil not have this file.Plz help
    The '.ttf' file is available in the Application's folder which is uploaded on the server.
    can't the client's machine take that font file from server and display in kannada language?

    iam not sure whether this question related to java or
    not.Hi,
    You are correct. It's not related to java at all. Try to ask this in an html of web development forum (but I would be suprised if you could implement it)
    Kaj

  • How To Display Value In inputText When List Is Used

    Hello,
    I have a question regarding how to display value from List in a jsf page?
    From a Map, i could display like
    <ice:inputText  id="plantno" value="#{bean.detailedRowData['plantno']}"So if I am using a List instead of Map, how can I refer value in List so that I could display my plantno?
    <ice:inputText  id="plantno" value="#{bean.?????}"Thanks

    Create a backing bean method that fetches the value from the list for you.
    <ice:inputText  id="plantno" value="#{bean.plantNo}"/>
    public class MyFunkyBean {
      private List<String> rowdata;
      public String getPlantNo(){
        return rowdata.get(INDEX_AT_WHICH_THE_PLANTNO_IS_STORED);
    }It really isn't possible to turn the list into a regular bean/entity?

  • How can i reset another page when call it from a page

    I use JDeveloper 10.3 to develop my application. And I want to reset value of UI component (inputtex, selectInputDate . . .) of a page when i call it from another page.
    Thanks!

    You can execute a method in "backing bean/Application module" on page load which can set the value of the UI components. Following link can help you to
    [http://kohlivikram.blogspot.com/2008/10/call-method-on-page-load-in-adf.html|http://kohlivikram.blogspot.com/2008/10/call-method-on-page-load-in-adf.html] .
    ~Vikram

Maybe you are looking for

  • I can no longer open a new tab by clicking on it or by using file and new tab menu, so what do I change or reset for new tabs to work?

    The tabs were working fine, but now tabs will not open when I click on the 'open a new tab + ' button, or if I go to 'file, new tab'. A new tab only opens when I click a link, but I cannot open a tab at will to start a new page. I used your troublesh

  • Color Bars Out of alignment after QT Export

    I am currently running Final Cut Pro 6.0.3. Recently I outputted a few files to send to a post house so that they could export a project to tape for me because I dont have an HDCAM deck. My sequence settings were: 1920x1080 HDTV 1080i (16:9) Compress

  • Need help with SQL Query with Inline View + Group by

    Hello Gurus, I would really appreciate your time and effort regarding this query. I have the following data set. Reference_No---Check_Number---Check_Date--------Description-------------------------------Invoice_Number----------Invoice_Type---Paid_Amo

  • Support for unit testing object types

    There's a Feature Request that suggests expanding the unit test tool to object types: Title Provide object type support for unit tests Description In the current version (2.1.0.63) I can perform only unit test for packages, function and procedures. B

  • BW Objects Translation

    Hi All, I need your suggestions regarding BW object translation. Suppose we are using normal BW objects translation process, after completing the translation process once for the whole system, if a new object has been created. For this new object tra