How do I stop a query from running when the page is loaded

Hi All,
I'm using JDeveloper 10.1.3.4. I have a JSPX page that is used to collect search parameters and then when a button is clicked uses those values to run a query and then populate a table on the same page. The problem is that when the page is loaded the system attempts to run the query. The query is a method in a session bean. I can keep the method from running the query code by wrapping it in an 'if' statement and checking the parameters for null (or other value). Once the parameters are collected the query is invoked but it looks like the method is running twice, once with the parameters (here I've checked that the result actually has rows in the list) and then again where the parameters are null and the method returns null.
What is the best way to do what I want here? From the buttons action method I am called the session beam method and returning null to stay on the same page. I think that is why the method is running the second time and returning null.
TIA,
Dave

Have a look at these screen casts from Steve Muench and see if one of these techniques works for you, or gives you the clue you need.
Creating Three Simple Search Pages with ADF Business Components and ADF Faces (JSF)
Part 1: Web-Style Search Form
Part 2: Oracle Forms-Style EnterQuery/ExecuteQuery Mode Page
Part 3: Search Form Using View Object with Named Bind Parameters
I had trouble viewing these with Firefox, but they worked in Internet Explorer.

Similar Messages

  • ADF how can i execute a query with parameters when the page renders

    hi
    i am using ADF web 11g
    i need to execute a query with parameters when the page renders
    thanks

    hello,
    I'm a fan of Java code, I really am.
    But when you use ADF, you decided to move to a more declarative environment.
    So why not do it declarative, the adf way?
    In your pagedef insert a action binding.
    This can be anything, a call to the application module, a call on the iterator(Like executeWithparams, etc.)
    Create an invokeAction in your pagedef and set the condition.
    This example refreshes(Action 2 is execute query) the data.
    First the method binding:
        <action IterBinding="PersoonIterator" id="Execute" InstanceName="LSAppModuleDataControl.Persoon"
                DataControl="LSAppModuleDataControl" RequiresUpdateModel="true" Action="2"/>And the invoke action
        <invokeAction Binds="Execute" id="refreshData"/>This always refreshes the data on page entry, but anything is possible, you can set condictions for the invokeAction.
    -Anton
    PS Yes I know that pagedefs become backing beans in the end and yes that is Java code, but if you wanna play the ADF way, the goal is the reduction of Java code and the increased performance of declarative programming.

  • How do I stop unnecessary programs from running in the background on a Macbook Pro 2010?

    Hi recently I bought a Macbook Pro OSX 10.8.3 2010 (2.4 GHz Intel Core / 2GB 1067 MHz DDR3). Im pretty content with it considering its my first Mac. Up until recently I had no problems with its speed.
    My brother directed me to the activity monitor and showed me how to quit a program. However there are still a several running programs I do not recognize and/or do not use (such as photo stream, Calendar Agent, UserEventAgent, Notification Center, AppleSpell service, cfprefsd, talagent, xpcd, imagent, com.apple.dock.extra, fontd, loginwindow, SystemUIServer, tccd, usernoted etc etc etc UGH!! The list just goes on and on. There is a circular graph at the bottom in pir form highlighted with the colors green, red, blue and yellow indicating what is taking up space or speed? If I quit Safari a huge portion of the green is highlghted. but I can not seem to get it to fill the majority of the pie graph. I see there are all these running programs (most of which I do not use or recognize) but I cannot get them to quit even if I highlight it. How can I stop this? Quite frankly its so frustrating. Again I am new to Mac.
    Thanks
    marcel11

    First, back up all data immediately, as your boot drive might be failing.
    There are a few other possible causes of generalized slow performance that you can rule out easily.
    Reset the System Management Controller.
    If you have many image or video files on the Desktop with preview icons, move them to another folder.
    If applicable, uncheck all boxes in the iCloud preference pane.
    Disconnect all non-essential wired peripherals and remove aftermarket expansion cards, if any.
    Check your keychains in Keychain Access for excessively duplicated items.
    Boot into Recovery mode, launch Disk Utility, and run Repair Disk.
    Otherwise, take the steps below when you notice the problem.
    Step 1
    Launch the Activity Monitor application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Activity Monitor in the icon grid.
    Select the CPU tab of the Activity Monitor window.
    Select All Processes from the menu in the toolbar, if not already selected.
    Click the heading of the % CPU column in the process table to sort the entries by CPU usage. You may have to click it twice to get the highest value at the top. What is it, and what is the process? Also post the values for % User, % System, and % Idle at the bottom of the window.
    Select the System Memory tab. What values are shown in the bottom part of the window for Page outs and Swap used?
    Next, select the Disk Activity tab. Post the approximate values shown for Reads in/sec and Writes out/sec (not Reads in and Writes out.)
    Step 2
    If you have more than one user account, you must be logged in as an administrator to carry out this step.
    Launch the Console application in the same way you launched Activity Monitor. Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Select the 50 or so most recent entries in the log. Copy them to the Clipboard (command-C). Paste into a reply to this message (command-V). You're looking for entries at the end of the log, not at the beginning.
    When posting a log extract, be selective. Don't post more than is requested.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some personal information, such as your name, may appear in the log. Anonymize before posting. That should be easy to do if your extract is not too long.

  • Automation: How to allow java plug-ins to run when the page is invoked via Selenium FF driver?

    My automated test involves navigating to a webpage on a remote system (via Selenium Firefox Driver) which runs a Java Plug-in to launch an embedded Java Applet. When the test first ran, I connected to the remote system (via Remote Desktop) and manually selected "Allow and Remember" as the plug-in was trying to run. However, this only addressed that first instance; it didn't address subsequent instances where I wanted to run the same test, same server (same plug-in).

    Hey I got an awesome tip about this from the #addons channel Archaeopteryx
    You can [http://www.ghacks.net/2013/07/31/manage-your-firefox-click-to-play-whitelist/ Manage your Firefox Click To Play Whitelist].
    Post back with the results :-)

  • How can I stop my battery from running out in my in my iphone 5 with the new i0s7

    how can I stop my battery from running at a super fast rate on my in my iphone 5 with the new i0s7, ever since I upgraded I am needing to charge up at least 3 times a day.

    https://discussions.apple.com/message/23361957#23361957

  • How do i stop two windows from openning when i clicon an email link, the home page and the link both open. i just want the link to open

    how do i stop two windows from openning when i click on an email link, the home page and the link both open. i just want the link to open

    That is a bug, so you need to wait until this get fixed.
    See https://bugzilla.mozilla.org/show_bug.cgi?id=531552 - Firefox 3.6b opens two windows when opening external links
    (please do not comment in bug reports)

  • How can i stop my picture from flipping when I take it on the front camera?

    How can i stop my picture from flipping when I take it on the front camera? Need help as it's frustrating me:(

    Hmm...Double click on the Home button and try to delete the camera app then launch it again that should fix it. You can also turn off your phone and turn it back on again.

  • Every time I restart my mac air some applications like calendar and Microsoft word automatically starts, how can I stop such applications from starting when ever I restart my mac

    Every time I restart my mac air some applications like calendar and Microsoft word automatically starts, how can I stop such applications from starting when ever I restart my mac?

    One thing to check:  when shutting down or restarting, there is a checkbox in the shutdown/restart dialog which asks whether you want currently open applications to open at startup.
    charlie

  • How do I invoke an ActionListener on a page when the page initially loads?

    How do I invoke an ActionListener on a page when the page initially loads?
    Page 1: A user clicks on a h:commandButton and is navigated to Page 2.
    Page 2: When the page loads and goes through RESTORE_VIEW, APPLY_REQUESTS and RENDER_RESPONSE, I need to call an ActionListener in the managed bean for Page 2.
    However, if the user comes in from any other page than Page 1, the ActionListener cannot be invoked intially when the page loads. The user has a choice to click on the h:commandButton on Page2 to invoke the ActionListener.
    What is an example of invoking a method with the ActionListener signature in Java code?
    Where would I put the code to invoke the ActionListener, in a beforePhase or afterPhase, constructor?
    Thanks,
    --Todd                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Interesting. You're right. It doesn't happen when I click away from this site and then return. Maybe I'm barking up the wrong tree. Maybe it's the specific website I was thinking of and not Firefox. Unfortunately, I have to use that site all the time for work. I'll try contacting their webmaster. Thanks for your help.

  • How can I permanently stop Backup Asisstant from running in the background?

    Backup Asisstant plus is constantly running in the background of my phone. It is annoying and I can not even open it up under the "manage accounts" section of my phone. When I do this it just has the blue circle spinning forever and ever never openning up at all. Is there a way to fix this or am I just stuck battling this stupid app day after day. It came with the Verizon phone, but I had this before and customer service was able to stop it from running all the time. Now I get told there is nothing Verizon can do. So how can I stop this app permanently and why is there so much comflicting information coming from Verizon agents and its website? I cant seem to get a solid answer.

    I have a galaxy s3. The backup assistant just freezes my phone. It is always running in the background draining memory from my phone slowing it down. It is beyond annoying since even after a hard reset I can not even access the Backup Assistant + to manually change settings, so I would just like it to stay off. It has not helped me recover much in the way it was advertised.

  • How do I stop iPhone Safari from dynamically resizing the visual viewport?

    Sorry I post this here, but I couldn't access the developer forums (no error given, it just keeps returning me to this page https://developer.apple.com/devforums/) I'm not even sure wether that's been moved here and it's just the redirection non working.
    I need to Stop iPhone Safari from dynamically resizing the visual viewport, or in other words, to stop it from trying to "fit" the layout into the viewport.
    Why?
    Because any recalculation javascript does on absolutely positioned elements makes the whole site super IRRESPONSIVE.
    I don't know wether the issue is the element going out the already-set layout viewport (which triggers the page resizing to fit the visual viewport) or just the calculations being made constantly, but I can stop the calculations from happening when not "touching" the screen, but I need a way to stop the page resizing.
    I tried setting the viewport width to 1040px, as my layout width, and it fixed the header's width being narrower than the body (or shifted left?), but the whole page is still resized with every motion-frame (one every 3 seconds, due to overloading the redrawing engine)
    Is there a way to prevent that?

    No, that link doesn't solve it. It just says the same is found everywhere online.
    There's probably no way to do it, as per their way they "accidentally" omitted the oposite case: the page being wider than 980. They only mention what to do if the site is narrower. Something I learned is big companies (with reputation management) could let you run in circles for years no answer rather than telling you something is not possible.
    I'm the developer (can't access the dev forums, don't know why) and I DID setup the viewport, scale and other properties but none of them stopped from re-fitting the new re-sized layout in the viewport. They just ensure the "initial" view.
    I think the feature I'm looking for must be achieved with some JavaScript function targeting Safari-proprietary variable/property… if even possible.
    I just had to make things never reaching the edge until somebody contributes something useful

  • I need an app that stops background apps from running when phone is sleeping

    i need and app that stops background apps (or maybe all apps) from running when phone is sleeping. thx!

    Too bad.  When I had a Droid there was an app that you could set which apps to quit and which to leave running.  Just convenient rather than having to go through the apps bar repeatedly and quit apps individually.  It is not an intrusion to control the phone or quit other running apps... it's my choice... Ooops!  My mistake.  Forgot that I no longer have free will in what I do.  The Company knows better.

  • How do I stop Java processes from appearing on the dock?

    I have a Java application that has a fairly extensive build process using ant. It builds fine on OSX, but constantly annoys me. There are a large number of unit tests that run using JUnit, and each test starts in a new Java process. The problem is that when each process starts (and there are about 100 during the course of the build), a new Java icon appears on the dock and stays until the process finishes. First of all, that slows down the build (since it has to do all that graphics work to keep changing the appearance of the dock). Secondly, every time a new process starts, it takes away the keyboard focus from whatever I'm currently working on. I either have to click in the window I want again, or else wait for the process to finish.
    On Windows, this is handled with an alternative version of the JVM called "javaw.exe" that does not get a foreground window. However, I see no "javaw" in the Java directory on OSX. Is there some option to start Java with that will stop this dock updating? Note that there are times when I want the dock to be updated (when I'm running a "normal" Java app).

    Even when the Guest Account / Access is disabled, the login option / and lock screen, still have a guest login.
    This is because in Preferences/ Security & Privacy/General the bottom item is turned on.
    Turn on: Disable restarting to Safari when screen is locked

  • How do I stop  Guest Account from appearing on the login screen?

    All of a sudden - like since I upgraded to iCloud - my login screen displays "Guest User". I have Guest disabled in Accounts. The only account I have active is mine. I don't want Guest to appear on the login screen. How do i stop it from doing so?

    Even when the Guest Account / Access is disabled, the login option / and lock screen, still have a guest login.
    This is because in Preferences/ Security & Privacy/General the bottom item is turned on.
    Turn on: Disable restarting to Safari when screen is locked

  • How can I stop my Macbook from going to sleep whilst I load the operating system (10.5) on?

    I'm trying very unsuccessfully to reinstall the system from scratch, so that I have a clean computer. I'm starting with 10.5 and then going to upgrade in increments from that to the last operating system the computer will run, which is 10.6.8.
    Firstly I've wiped the hard disk in Disk Tools and then started it up from the master disk of 10.5, and its telling me it will take 64 hours and some minutes to install, so I can't keep moving the mouse to stop it going to sleep for that long.
    I know it sounds as though something is wrong, but I have run both Disk Tools and Tech Tool Pro through it and both say there's nothing wrong with either the computer or the hard disk, and it was running fine (if slow - but that's its age!) prior to this clean install.
    This computer is the first of the intel Macbooks and is a single core intel processor with 1gb of Ram.
    What I need to do is to stop it going to sleep during the install, as every time it does it just halts the install and over night, for instance, I'm no further forward than I was the night before, even though I left it going all night.
    All I'm trying to do is get it to 10.6.8 so that I can run Bootcamp on it and turn it into a PC to do my accounts (and no, the software we use only runs on PC, but Paralles, VMWare Fusion etc still make it painfully slow to use, and It's bad enough having to do accounts without having to wait for it to do every move...)
    I can't go straight to 10.6 as the only copies we have of this are "drag and drop" upgrades that Apple supplied with 3 of our other Macs. Also the computer won't read dual layer DVDs (too old) so I can't load the full copy we have made of the OS.

    It's simply called Photos and there is no options/setting thing on it. I have windows 8, it's a stand alone photo library viewer.

Maybe you are looking for