How to execute a query when pressing a button

hi,
i created a frame (ADF Swing).
in this frame i have a textfield, a button and a jtable.
i want when i press on the button i execute a query which has a condition in the textfield and i want that the result will be shown in the jtable.
thanks for help.

Hello,
I would test the record status of the first record in the block. If this status is 'NEW', then there is no record retrieved, so that you can exit the query mode with exit_form()
Francois

Similar Messages

  • How to invoke plsql block when press a button

    new to htmldb,
    let's say i have a form with some items , after i press a button, i want to invoke a plsql block, how can i do that?
    Cheers,

    I have only played a bit with this. I had a region with search criteria’s and a region based on a procedure. I created a page button on the first region that branched to the same page. When I press the button the page is refreshed and the procedure is re-executed with what ever search criteria’s the user has keyed in. That is as far as I have come :-)

  • How to enable the InputField when press the Button

    My sceanrio is by default the InputField is in disable .when ever i press the button it should enable.

    Here is the sample code for HTMLB :
    <hbj:inputField
        id="InputText"
        jsObjectNeeded="true"
        type="string"
        maxlength="30"
        value="Text" >
    <% String text = myContext.getParamIdForComponent(create_group); %>
    <SCRIPT> var jsText = '<%=text%>'; </SCRIPT>
    </hbj:inputField>
    <hbj:button id="Enable_Button"
           text="Enable"
           tooltip="Enable InputField"
           onClick="onEnableClick"
           onClientClick="enableInputField()"
           width="30px" >
    </hbj:button>
    </hbj:page>
    </hbj:content>
    <script language="javascript">
         function enableInputField()
              var funcName = htmlb_formid+"_getHtmlbElementId";
              func = window[funcName];
              var inputfield = eval(jsText);
                                    inputfield.setEnabled();
    </script>
    Refer to the following links for more info...
    http://help.sap.com/saphelp_nw04/helpdata/en/53/9d0e41a346ef6fe10000000a1550b0/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/43/067941a51a1a09e10000000a155106/content.htm
    Regards,
    Rajiv

  • How to when press the button and can change the value in the table?

    this is my code so far with a table and a button..how can i make it when press the button and the data in table change..
    * SimpleTableDemo.java is a 1.4 application that requires no other files.
    import java.awt.BorderLayout;
    import java.awt.Button;
    import java.awt.Color;
    import java.awt.Dimension;
    import java.awt.event.MouseAdapter;
    import java.awt.event.MouseEvent;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    public class SimpleTableDemo extends JPanel {
    private boolean DEBUG = false;
    private JPanel button;
    private JButton enter;
    public SimpleTableDemo() {
    super(new BorderLayout());
    //button.setBackground(Color.pink);
    //setForeground(Color.pink);
    String[] columnNames = {"First Name",
    "Last Name",
    "Sport",
    "# of Years",
    "Vegetarian"};
    Object[][] data = {
    {"Mary", "Campione",
    "Snowboarding", new Integer(5), new Boolean(false)},
    {"Alison", "Huml",
    "Rowing", new Integer(3), new Boolean(true)},
    {"Kathy", "Walrath",
    "Knitting", new Integer(2), new Boolean(false)},
    {"Sharon", "Zakhour",
    "Speed reading", new Integer(20), new Boolean(true)},
    {"Philip", "Milne",
    "Pool", new Integer(10), new Boolean(false)}
    final JTable table = new JTable(data, columnNames);
    table.setPreferredScrollableViewportSize(new Dimension(500, 70));
    if (DEBUG) {
    table.addMouseListener(new MouseAdapter() {
    public void mouseClicked(MouseEvent e) {
    printDebugData(table);
    //Create the scroll pane and add the table to it.
    JScrollPane scrollPane = new JScrollPane(table);
    enter = new JButton("Press me");
    //Add the scroll pane to this panel.
    buildButton();
    add(scrollPane, BorderLayout.NORTH);
    add(button, BorderLayout.CENTER);
    private void buildButton(){
    button = new JPanel();
    button.add(enter);
    private void printDebugData(JTable table) {
    int numRows = table.getRowCount();
    int numCols = table.getColumnCount();
    javax.swing.table.TableModel model = table.getModel();
    System.out.println("Value of data: ");
    for (int i=0; i < numRows; i++) {
    System.out.print(" row " + i + ":");
    for (int j=0; j < numCols; j++) {
    System.out.print(" " + model.getValueAt(i, j));
    System.out.println();
    System.out.println("--------------------------");
    * Create the GUI and show it. For thread safety,
    * this method should be invoked from the
    * event-dispatching thread.
    private static void createAndShowGUI() {
    //Make sure we have nice window decorations.
    JFrame.setDefaultLookAndFeelDecorated(true);
    //Create and set up the window.
    JFrame frame = new JFrame("SimpleTableDemo");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    //Create and set up the content pane.
    SimpleTableDemo newContentPane = new SimpleTableDemo();
    newContentPane.setOpaque(true); //content panes must be opaque
    frame.setContentPane(newContentPane);
    //Display the window.
    frame.pack();
    frame.setVisible(true);
    public static void main(String[] args) {
    //Schedule a job for the event-dispatching thread:
    //creating and showing this application's GUI.
    javax.swing.SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    createAndShowGUI();
    }

    Cross-post:
    http://forum.java.sun.com/thread.jspa?threadID=676105

  • Can I stop a report from Re-executing the query when I go back to that page

    I have a report that has a complicated query and looks at a lot of information to display the results. This query then links of to show details of individual items that were displayed in the result. But when I hit the back button on the browser, it executes the query again and it takes a while for the page to load.
    Is there any way to stop this and only execute the query when the User pushes a Button on the page else display the previous results.
    Thanks
    Sriram

    Another alternative is to make that detail link open in a popup window using
    javascript:popupURL(...);This way, the complicated report page is always visible.

  • How to execute SQL Query in Code behind Using infopath 2010?

    Hi,
    I've repeatable on infopath form, and want bind it throuth code behind from SQL table. My question is that how to execute SQL Query in code behind from infopath as well as how would get Query result to bind repeatable control?
    Thanks In Advance
    Shoeb Ahmad

    Hello,
    You first need to add new SQL DB connection then you need execute connection from code behind.
    See below link to create new connection
    http://office.microsoft.com/en-in/infopath-help/add-a-data-connection-to-a-microsoft-sql-server-database-HP010092823.aspx:
    http://www.bizsupportonline.net/infopath2010/connect-infopath-2010-sql-server-2008-table.htm
    Then use below code to execute this connection:
    AdoQueryConnection conn = (AdoQueryConnection)(this.DataConnections["Data connection name"]);
    string origCommand = Select * from tablename;
    conn.Command = origCommand;
    conn.Execute();
    Finally bind your table:
    http://www.bizsupportonline.net/infopath2007/4-way-programmatically-add-row-repeating-table.htm
    http://stevemannspath.blogspot.in/2010/09/infopath-20072010-populate-repeating.html
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • HT4211 My i pad hang on with information of icloud back up with informtion of "this ipad hasn't been backed up in three weeks. backups happen when this pad is plugged in, locked and connected to wifi"  and doesn't close when press ok button. I am not able

    My i pad hang on with information of icloud back up with informtion of "this ipad hasn't been backed up in three weeks. backups happen when this pad is plugged in, locked and connected to wifi"  and doesn't close when press ok button and still hangon. I am not able to switched off also. How to remove popoup note and entering into ipad applications.

    Hold down the sleep and home keys for about 20 seconds or so and see if it reboots.

  • My mini ipod appears off and not respond to any commands when pressed the buttons to reset, apple logo appeared and then the apple support site and it shuts down. already tried all the steps, but none worked, and when I plug it into my computer it does no

    My mini ipod appears off and not respond to any commands when pressed the buttons to reset, apple logo appeared and then the apple support site and it shuts down. already tried all the steps, but none worked, and when I plug it into my computer it does not appear in the iTunes bar. what do I do?

    If MacKeeper corrupted the Recovery partition then even I underestimated its potential for damage. Garbage "cleaning" apps will cause misery but I have not found that the Recovery partition to have been affected by using MacKeeper or anything like it. I doubt that it did so, but I have learned not to underestimate the potential for such things to result in system corruption.
    Before concluding your Mac has a hardware failure, try booting OS X Internet Recovery by holding command option r on startup (three fingers). That will force your iMac to bypass the Recovery partition altogether, and convey the ability to create a new one.
    An Internet connection will be required (wired or wireless).
    At the Mac OS X Utilities screen, select Disk Utility. Select your startup volume (usually named "Macintosh HD") and click the Repair Disk button. Describe any errors it reports in red. If Disk Utility reports "The volume Macintosh HD appears to be OK" in green then you can be reasonably (though not completely) assured your hard disk is in good working order.
    Assuming the HD remains usable you can then use Disk Utility to erase it. Reinstall OS X, restore your essential software and other files, and don't reinstall the junk.

  • Malfunctioning printer call to DLBAPRP,DLL FOR DELL PRINTER A940, ERROR 126. This error occurs when pressing properties button. Is there a patch to fix this?

    This error does not occur with any of my other programs employing this printer when pressing properties button. The complete error message I get is as follows:
    '''DELL PRINTER A940 PROPERTIES'''
    Function address 0x0 caused a protection fault (exception code 0xc0000005). The application property sheet page(s) may not function properly.
    |OK|

    Perform the suggestions mentioned in the following articles:
    * [[Firefox prints incorrectly#w_reset-firefox-printer-setting|Reset Firefox Printer Setting]]
    * http://kb.mozillazine.org/Problems_printing_web_pages
    Check and tell if its working.

  • Macbook pro not opening when press power button

    my mac book pro not opening when press power button even battery is full.

    I already tried with the Battery in and without but no luck. I'm sure it's not that kind of problem unfortunally

  • Submiting requests when pressing a button.

    I have a button that when pressed should fire an HTMLDB After Submit process and just after the process has finished, it should trigger a javaScript function to call a pop-up page.I've tried to do that in three different ways:
    1)Using the button optional URL redirect, and as the URL target I send first the request to run the After submit process and then the request to open the pop-up window.
    The problem with that solution is that the pop-up window opens before the
    process is completed, which is an inconvinience for me.
    2)Running the After submit process when pressing the button and running an after processing braching to call the javaScript function. It didn't work as HTMLDB redirect the application to an error page saying that no branch is specified...
    3)Inside the After submit process after a call to a procedure that resolves the logic of the process I've tried to call the pop-up using webtoolkit's tag htp.p as follows:
    htp.init;
    htp.p('<script language = "javascript">');
    htp.p('callMyPopup2("480",'+l_aux+');');
    htp.p('alert("entre");');
    htp.p('</script>');
    But it didn't work neither.
    The HTMLDB version I'm using is 1.5.0.00.33. Is there a way to accomplish that when pressing a button a process is ran and just after its execution is finished call a javascript function that opens a pop-up page?
    Thanks in advance.
    Best Regards.
    Larissa.

    Vikas,
    The question is interesting. I remember trying something similar without success and would be interested in an answer. I could imagine the following situation:
    1. I start a process that runs a procedure which fills in a table with values
    2. after the process is completed a pop-up window opens and runs a report on that table...
    This could be practical since a user that started the procedure doesn't have to wait for it to complete in order to click another button to see the result. This is just one possible example.
    Denes Kubicek

  • How to cancel a query when execute query builtin fire and No Records found.

    Hi,
    I am unable to cancel a query when i make query (fire enter-query) then fire (execute-query) and no records found then the form status is enter-query mode. Plz help me that how can i back to normal mode of form.
    here i use the code for coming back to enter-query to normal mode but no results.
         if :system.mode = 'ENTER-QUERY' THEN
    ABORT_QUERY;
         clear_form;          
         END IF;
    thanks in advance....

    Hello,
    I would test the record status of the first record in the block. If this status is 'NEW', then there is no record retrieved, so that you can exit the query mode with exit_form()
    Francois

  • How to execute a query than open a popup?

    Hi,
    We created a custom OA module. This module has buttons on it. Those buttons generates events. Depending on each event, I should execute a query, transform the result in a xml than open a popup and pass the xml content to the jsp page that was opened.
    what have I done so far:
    - Threat the events generated by the buttons - That is being done on the processFormRequest in the CO;
    - The CO has to call a AM method to execute a query. That is not done but it is easy to do it;
    - The "resultset" of the query has to be transformed to a xml. If some one can give me a clue how to do it would be nice;
    - Finally, in the CO with the xml, open a popup passing the xml. How can this be done?.
    thanks,
    Marcelo

    - The "resultset" of the query has to be transformed to a xml. If some one can give me a clue how to do it would be nice;
    You can get the VO resultset as XML using writeXML method in VOImpl.- Finally, in the CO with the xml, open a popup passing the xml. How can this be done?.
    Is the new page being opened a OAF page ? if yes then you can just retain the AM when you go to the new page and you will have the VO with the data in it, you can then use the VO as is or write the XML from the VO data.If , on the other hand, your new page is not a OAF page and is a simple jsp, then
    I dont think it is a good idea to pass the entire resultset as a XML to the target page, instead, you can just popup the page on press of the button and execute and generate the XML in the target page.
    Thanks,
    Tapash

  • How to suppress the showing up of the menu when press soft buttons...

    I'm writing a game with fullscreen mode. When I press soft buttons in fullscreen mode, the menu shows up. How can i suppress it when i press the soft buttons for my own executions.
    I have tested a game on Nokia 6600.

    U missed understand my mine.
    I want to suppress the system menu when i press soft buttons in fullscreen mode. I want to execute my own codes when i press soft buttons.
    thanks

  • Please help on how Bex execute the query designed in query designer.

    Hi All,
    Want to know how bex execute/interpret  the query when the query is execute in analyzer.
    I mean which part of the query is executed first, like  filter,RKF or CKF etc.
    Want to do step by step analysis .Please suggest on this.
    Thanks & Regards
    Sameer Khan

    HI,
    When u execute the query...It will fetch the Global filters data first ....means filters on Default values....then restrictions on Char Restriction pannnel....Then calculate the RKF and CKF,s....Conditions and Exeptions etc.......
    Thanks

Maybe you are looking for

  • Throwing Microsoft.ReportingServices.Library.ReportServerDatabaseUnavailableException

    Hello, I am supporting Report Server 2008 R2 with integrated mode to SharePoint 2010. For one of the report, if records are over 300, the report will not show on IE, but on status bar, there will be error as: Message: Sys.WebForms.PageRequestManager

  • Is there a filter available for content (such as ***********,violence, etc) that can be used in Safari?

    I'm considering getting an iPhone. However, I'm worried about Safari. What if I stumble upon a bad website, filled with that kind of content? So there must be some sort of filter, available to install for the content streaming into Safari...

  • Gaps between letters in Text Style

    Hello, I have noticed that when I use a text style with the 'smart path following' option (Style Options - Path Labeling) I get irregular gaps between the text's letters (e.g. 'Mai n Stre et' instead of 'Main Street'). This happens with several fonts

  • Save to Web and Devices crashes Photoshop CS5

    I am working with Photoshop CS5 on a MacBook Pro with 4 MB RAM in MacOS 10.5.8. I upgraded from CS3 about a month ago. I've tried switching the RGB mode from 8 to 16 and 32 bit modes, but whenever I "Save to Web and Devices" my Photoshop crashes. It

  • URL Rewriting & Mozilla

    I've noticed some functional changes between SJSAS 8 Update 1 and SJSAS 8 2004Q4 Beta regarding use of URL rewriting in webapps. Our servlet explicitly disables cookies in preference for URL rewriting. In SJSAS8-Update1, as for every other app server