Create Detail Record - always two button presses

Ok, this shouldn't be this hard.
I drag and drop a master/detail onto jsff
I pick master form/detail table
Add a "create" button to the detail table
Set the partial trigger for the button (which also adds to the table)
So, theoretically when positioned on a Master record when you press the Create button, a new record should open up, but it won't do this unless I click the button twice.
What did I do wrong?

Timo,
As I mentioned I do have setter methods before setting the status as STATUS_INTIALIZED in my code. It looks something like this :
newCustAccRow.setAttribute("CustomerId",customerId);
newCustAccRow.setNewRowState(Row.STATUS_INITIALIZED);
I've tried various combinations and none of them works for me. The row is now getting picked up as part of the transaction.
Thanks,
Shishir

Similar Messages

  • Show indices of Last TWO buttons pressed in a boolean array (how to?)

    How would you go about showing the indices of the last TWO buttons pressed in an array of buttons, and only after TWO buttons have been pressed? I know how to show the LAST button pressed, and I know how to flag the event of two buttons being pressed (using the modulus), but I can't readily see how to show the indices of the last TWO.
    For example, in an array of 24 buttons, someone presses buttons 2 and 7... an indicator says 2 & 7. Those buttons remain pressed. Now the user presses buttons 14 and 3, the same indicator now reads 14 & 3.
    The indicator can be text, an int array, two ints, whatever. Any ideas?
    Message Edited by LV_Addict on 07-28-2008 01:29 PM

    Thanks Ben.
    To get the LAST button pressed, I just XOR the array and look for the True, as shown. No biggie.
    Yep, I know about the ability to expand the left side S/R to get a histogram, and have used that in the past. It doesn't seem to do anything for me here!
    Attachments:
    forumpic.jpg ‏9 KB

  • Creating Detail record in Master Detail form

    I have created a Master Detail form with the Detail form being on a second page.
    I have no problem editing an existing detail record. However, if I attempt to create a new Detail record (insert). I get an error. It appears that the value of the field that I am linking the Master and Detail records with, does not get passed to the second (detail) form when I press the 'Create' button and I have not been able to ascertain where I may need to modify the parameters of the page.
    Any guidance would be appreciated.

    Hi Judy,
    It's been 5-6 months since I've created a Master/Detail APEX application, but I don't remember having to create any special trigger or anything. I created a few maintenance appls over tables I created, and created an inquiry appl using Oracle vendor tables. All of them have worked nicely.
    If the PK/FK's are set up correctly it just works. :-) Like magic. If I recall correctly, as you create the appl you define the the key fields to use. If the tables are defined correctly, and you 'tie' them together using the correct key fields in the application everything should work nicely.
    Tony

  • Sending an object from client to server always on button press

    What I need is to send an object from client to server but I need to make server wait until another object is sent. What I have is the JFrame where you put the wanted name and surname, then you create a User object with these details and on button press you send this object to the server. I just can't hold the connection because when I send the first object, server doesn't wait for another button click and throws EOFexception. Creating the while loop isn't helpfull as well because it keeps sending the same object again and again. The code is here
    public class ClientFrame extends JFrame {
        private JButton btnSend;
        private JTextField txfName;
        private JTextField txfSurname;
        public ClientFrame() {
            this.setTitle(".. ");
            Container con = this.getContentPane();
            con.setLayout(new BorderLayout());
            txfName = new JTextField("name");
            txfSurname = new JTextField("surname");
            btnSend = new JButton(new AbstractAction() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    SSLSocketFactory f =
                            (SSLSocketFactory) SSLSocketFactory.getDefault();
                    try {
                        SSLSocket c =
                                (SSLSocket) f.createSocket("localhost", 8888);
                        c.startHandshake();
                        OutputStream os = c.getOutputStream();
                        ObjectOutputStream oos = new ObjectOutputStream(os);
                        InputStream is = c.getInputStream();
                        ObjectInputStream ois = new ObjectInputStream(is);
                        boolean done = false;
                        while (!done) {
                            String first = txfName.getText();
                            String last = txfSurname.getText();
                            User u = new User();
                            u.setFirstName(first);
                            u.setLastName(last);
                            oos.reset();
                            oos.writeObject(u);
                            String str = (String) ois.readObject();
                            if (str.equals("rcvdOK")) {
                                System.out.println("received on the server side");
                            } else if (str.equals("ERROR")) {
                                System.out.println("ERROR");
                        //oos.writeObject(confirmString);
                        oos.close();
                        os.close();
                        c.close();
                    } catch (ClassNotFoundException ex) {
                        Logger.getLogger(ClientFrame.class.getName()).log(Level.SEVERE, null, ex);
                    } catch (IOException ex) {
                        System.err.println(ex.toString());
            btnSend.setText("send object");
            con.add(btnSend, BorderLayout.PAGE_START);
            con.add(txfName, BorderLayout.CENTER);
            con.add(txfSurname, BorderLayout.PAGE_END);
            this.pack();
            setSize(200, 150);
            setVisible(true);
    public class TestServer {
        public static void main(String[] args) {
            try {
                KeyStore ks = KeyStore.getInstance("JKS");
                ks.load(new FileInputStream(ksName), ksPass);
                KeyManagerFactory kmf =
                        KeyManagerFactory.getInstance("SunX509");
                kmf.init(ks, ctPass);
                SSLContext sc = SSLContext.getInstance("TLS");
                sc.init(kmf.getKeyManagers(), null, null);
                SSLServerSocketFactory ssf = sc.getServerSocketFactory();
                SSLServerSocket s = (SSLServerSocket) ssf.createServerSocket(8888);
                printServerSocketInfo(s);
                SSLSocket c = (SSLSocket) s.accept();
                InputStream is = c.getInputStream();
                ObjectInputStream ois = new ObjectInputStream(is);
                OutputStream os = c.getOutputStream();
                ObjectOutputStream oos = new ObjectOutputStream(os);
                boolean done = false;
                User u;
                  while(!done){
                    u = (User) ois.readObject();
                    String confirmString = "rcvdOK";
                    String errorString = "ERROR";
                    if (u != null) {
                        System.out.println(u.getFirstName() + " " + u.getLastName());
                        oos.writeObject(confirmString);
                    } else if (u == null) {
                        oos.writeObject(errorString);
                is.close();
                s.close();
                c.close();
            } catch (Exception e) {
                    System.err.println(e.toString());
    }Thanks for any help, btw this doesnt need to be via ssl, the problem would be the same using only http. Please anyone help me:)
    Edited by: Vencicek on 7.5.2012 2:19
    Edited by: EJP on 7/05/2012 19:53
    Edited by: Vencicek on 7.5.2012 3:36

    Current code fails because it's sending still the same entity again(using while loop)No it's not. You are creating a new User object every time around the loop.
    which makes the system freezeWhich means that you are executing network code in the event thread. Don't do that, use a separate thread. At the moment you're doing all that sending inside the constructor for ClientFrame which is an even worse idea: you can never get out of there to the rest of your client program. This is a program design problem, not a networking problem.
    and doesn't allow me to set new parameters of the new entityI do not understand.
    I need to find a way to keep Server running even when the client doesn't send any data and wait until the client doesnt press the send button again to read a new object.That's exactly what happens. readObject() blocks until data is received.

  • Best way to create detail records based on data in the master record..

    Hi,
    I am using 11gr1p1 and ADF stack.
    I have a master detail relation between 2 records. I have EO and entity associations. I want to create a number detail records based on the data on the master record.
    For example
    I have a Stay Record which has begin and end date I need to create the DailyStay Record for each day for the range of begin and end date of StayRecord.
    Where should I do this? In EO implementation or in VO implementation.?
    Thanks

    Where should I do this? In EO implementation or in VO implementation.?If your child record should in no case be created without those default values, then EO.
    Otherwise, to increase reusability of your EO, then in the VO over the view link (i.e. other VO's would still be able to use your EO without having the child VO created with these defaults).
    This way your ViewObjects can also be used in a context where you don't want to copy from the masterFrank, If there's another UI flow that is so drastically different that it does not want things defaulted, then it probably needs a different VO altogether (on the same underlying EO though)

  • Two buttons pressing

    I know some Java and I have to make a program that will press two buttons like this:
    If i press the button START it will
    1. Wait 5000 milliseconds
    2. Press F5
    3. Wait 100 milliseconds
    4. Press Enter
    5. Wait 2000 milliseconds
    and then over and over again from step 2, until i press the button STOP
    I don't think that it will work in applet, because when you minimize applet, it stops working. Am I right?
    So I will have to use the standard Java. Right?
    And by the way. What is the function for automatic press of some king of button?

    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    class RobotDemo {
        private final JButton startButton = new JButton("Start");
        private final JButton stopButton = new JButton("Stop");
        private final ButtonActionListener listener = new ButtonActionListener();
        private final JTextArea display = new JTextArea(10, 40);
        private final String newline = System.getProperty("line.separator");
        private PhantomKeyPresser phantom;
        public RobotDemo() {
            initGui();
        public static void main(String[] args) {
            new RobotDemo();
        private void initGui() {
            JFrame frame = new JFrame("RobotDemo");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            display.setEditable(false);
            frame.getContentPane().add(new JScrollPane(display), BorderLayout.CENTER);
            startButton.addActionListener(listener);
            stopButton.addActionListener(listener);
            stopButton.setEnabled(false);
            JPanel buttonPanel = new JPanel();
            buttonPanel.add(startButton);
            buttonPanel.add(stopButton);
            frame.getContentPane().add(buttonPanel, BorderLayout.SOUTH);
            frame.pack();
            frame.setLocationRelativeTo(null);
            frame.setVisible(true);
            display.addKeyListener(new KeyAdapter() {
                public void keyPressed(KeyEvent e) {
                    display("Somebody pressed: " + KeyEvent.getKeyText(e.getKeyCode()));
            display.requestFocus();
        private void display(final String message) {
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    display.append(message);
                    display.append(newline);
        private class ButtonActionListener implements ActionListener {
            public void actionPerformed(ActionEvent evt) {
                if (evt.getSource() == startButton) {
                    startButton.setEnabled(false);
                    stopButton.setEnabled(true);
                    startPhantom();
                } else if (evt.getSource() == stopButton) {
                    startButton.setEnabled(true);
                    stopButton.setEnabled(false);
                    stopPhantom();
        private void startPhantom() {
            phantom = new PhantomKeyPresser();
            Thread t = new Thread(phantom);
            t.start();
        private void stopPhantom() {
            phantom.stop();
        private class PhantomKeyPresser implements Runnable {
            private boolean iShouldKeepRunning = true;
            private Robot robot;
            public void run(){
                display("The phantom has been started!");
                try {
                    robot = new Robot();
                } catch (Exception e) {
                    throw new RuntimeException(e);
                display("The phantom waits for 5 seconds...");
                sleep(5000);
                while (iShouldKeepRunning) {
                    display("The phantom presses the F5 key...");
                    robot.keyPress(KeyEvent.VK_F5);
                    sleep(100);
                    display("The phantom presses the Enter key...");
                    robot.keyPress(KeyEvent.VK_ENTER);
                    sleep(2000);
            public void stop() {
                iShouldKeepRunning = false;
                display("The phantom has been stopped!");
            private void sleep(long millis) {
                try {
                    Thread.sleep(millis);
                } catch (InterruptedException e) {
                    e.printStackTrace();
    }

  • I can get the apple logo on the phone but nothing else. Have tried resetting by pressing the two buttons at same time but no response. Any ideas please?

    iphone only displays logo, nothing beyond this. any suggestions please other than two buttons pressed at same time? thanks, stu

    See Here for Device Unresponsive
    http://support.apple.com/kb/ts1445
    The Basic Troubleshooting Steps are:
    Restart..  Reset..  Restore from Backup..  Restore as New...
    Try this First... You will Not Lose Any Data...
    Turn the Phone Off... ( if it isn’t already )
    Press and Hold the Sleep/Wake Button and the Home Button at the Same Time...
    Wait for the Apple logo to Appear and then Disappear...
    Usually takes about 15 - 20 Seconds... (But can take Longer...)
    Release the Buttons...
    Turn the Phone On...
    If that does not help... See Here:
    Backing up, Updating and Restoring
    http://support.apple.com/kb/HT1414

  • When-button-pressed trigger save two records ?

    Hi all,
    I'm very new to Oracle form. I intend to make a very simple form where will allow user to enter and save record when finished.
    There I have build up the form and one push button where will called the when-button-presses when the user click.
    I have write the query as below :-
    begin
         if :device is null then
              message('Device no is null!!');
              raise form_trigger_failure;
         else
              insert into aic_std_cost_sell_price values ( :device, :asm_price, :tst_price);
              commit;
         end if;
    end;          
    however when save, two record had been inserted? and why ?
    rgds
    Lim

    When you create a block based on a database table, Forms builds and executes a SQL insert statement for you when you issue a commit statement. Therefore, yours is running, then Forms builds and executes one.
    Remove your insert statement. You don't need it.
    And change the COMMIT; to COMMIT_FORM; They do the same thing, but using commit_form will help you remember that lots of things are going on behind the scenes when you use it.

  • View detail records from interactive report with button press

    Hi I want to create a intractive report that will have a + sign for the user to expand the detail region below the record.
    Thanks.
    PKP

    thanks kartik,
    I did exectly what is there in there. But I am having problem in display. I have put my application in
    http://apex.oracle.com/pls/apex/f?p=44031:1
    login as GUEST/password
    select Company Accounts Management from Application Menu --> setup tab -> Companies from setup menu
    the detail record is not displaying. correctly.

  • Using EJB creating Master/Detail Record

    Hi All
    I would really in need of your help regarding how to show the information of master detail records in a single form
    eg: one text field with department Id and a Search button which should give relevent employees details working in that particular department.
    I tried with ADF business components it works fine..
    I need to do through pure Session Beans and Entity Beans(note : not thru using EJB:UseBean Tag)
    Please i will really appreciate your valuable help..
    Thanks All
    Have a Nice day
    Mohamed Anez

    Kunal:
    Use a code snippet like the following:
    --- Assuming you're in the detail EO's create method ---
    oracle.jbo.server.EntityDefImpl eDef = oracle.jbo.server.EntityDefImpl.findDefObject(<package-qualified-name-of-the-master-Entity-Object>);
    oracle.jbo.Row masterRow = eDef.findByPrimaryKey(this.getDBTransaction(), <foreign-key>);
    If the row does not exist, masterRow will be null.
    findByPrimaryKey first checks the entity cache (which will include your new master row(s)) and then go out to database (if it's not in cache).
    Thanks.
    Sung

  • Two button dialog have to press no twice

    I put a 2 button dialog in an event structure. When my stop button is pressed the value changes, it enters the event structure and a two button dialog pops up that says do you really want to quit? If yes is pressed the program ends. If no is pressed the dialog box stays open. If its pressed again, then the program continues running. Essentially it does what i need it to do, keeps the program running if no is pressed but its a bit annoying to always have to click it twice. Any way to fix this?
    CLA, LabVIEW Versions 2010-2013

    Is it possible that you may have 2 instances of this dialog in the block diagram, one on top of the other, so you can't see there's 2 of them there? Try moving the VI icon. If not, please post your code, as it may be a race condition.

  • Create Bank Details record but leaving the IBAN as blank

    Hi Gurus,
    I would like to ask if it is possible to Create the Bank Details record (IT0009) and Leave the IBAN field as blank?
    We have this requirement to leave the IBAN as blank.
    What we did was to make the IBAN field Optional in table T588M. We did our testing in the Development box and it worked provided that there is no Bank Detail record for the employee with IBAN record. If the employee has a previous record with IBAN in it, it wont allow us to save the entries without the IBAN. Is it possible to have the IBAN left empty? How do we proceed with that? How to configure?
    Thanks in advance!

    Hi Christine,
    Thank you for your quick response.
    I cannot put ADMIN IBAN as space, because not all countries want to have the IBAN blank.
    They only want it for some Personnel Areas.
    How can I do such request? Thank you very much for helping.

  • Foreign key validation while creating master/detail record in document mode

    I am creating master/detail records in the document mode. And I am generating the master primary key in the create() method of the master Entity Object. Now I valdate the foreign key in the detail Entity Object's validateEntity() method by doing a query to the master table through some View Object.
    But since the master record has not yet been posted (since it hasn't been committed) to the database, this query does not return any record and the validation fails in detail object.
    And thus the create fails.
    Please let me know if this is the right approach for doing this. If so where I am going wrong? Else please let me know if there are any better approach to do this.
    Kunal

    Kunal:
    Use a code snippet like the following:
    --- Assuming you're in the detail EO's create method ---
    oracle.jbo.server.EntityDefImpl eDef = oracle.jbo.server.EntityDefImpl.findDefObject(<package-qualified-name-of-the-master-Entity-Object>);
    oracle.jbo.Row masterRow = eDef.findByPrimaryKey(this.getDBTransaction(), <foreign-key>);
    If the row does not exist, masterRow will be null.
    findByPrimaryKey first checks the entity cache (which will include your new master row(s)) and then go out to database (if it's not in cache).
    Thanks.
    Sung

  • How to create One Master - and 2 detail records region

    Hi,
    My requirement is to have three regions on a single page, one for master record and two for detail records.
    Also, one detail record region needs to upload images (photos) to database.
    Can some one tell me how to do this in APEX.
    Thanks
    Aali

    Hi Aali, I have the same issue in a master detail form, I don't know how to upload images in the detail form, can you help me please.
    Thanks and regards,
    Wilson

  • I downloaded the latest iOS7 to my iPad and then the screen went blank and would not respond.   I have tried pressing the two buttons together and briefly get the Apple logo but still can not start up, the logo disappears.   I have tried connecting the iP

    I downloaded the latest iOS7 to my iPad and then the screen went blank and would not respond.   I have tried pressing the two buttons together and briefly get the Apple logo but still can not restart, the logo disappears.   I have tried connecting to my iMac to restore the iPad but the device does not show up (I have an old iMac).   What else can I do?

    You need to be running Snow Leopard 10.6.8 at the very least in order to sync your iPad with iTunes so you could update your Mac, if it can be updated, and if you care to do so.
    If that's not an option, you will have to find someone that can restore the device for you with their computer running iTunes or make an appointment at an Apple Store and ask them to restore the device for you.
    I hope that you have an iCloud backup, because you will lose everything on the device when it is restored.
    Snow Leopard can still be purchased in the U.S. Apple Online Store.
    http://store.apple.com/us/product/MC573Z/A/mac-os-x-106-snow-leopard
    Also, I would not give up on the reset technique....holding down on the sleep and home buttons at the same time until the Apple logo appears. It takes about 10-15 seconds and sometimes just a little longer to get the logo to appear.

Maybe you are looking for

  • HT3819 How do I share my itunes library with my mother on the same computer, but different accounts?

    How do I share my itunes library with my mother on the same computer, but different accounts? My mother and I share a desktop computer (apple) and we have seperate itunes accounts. How do we share accounts?

  • How do you add a custom label to dates in contacts.....

    How do you add a custom label to dates in contacts- I have multiple birthdays in contact group and want to change label through customise to add additional birthday- unless another way to add second birthday to contacts and identify each one?????? or

  • Work item display for step : Deadline Missed

    Hi, Parked invoices for one of the vendor is not triggering the work item in the workflow inbox. But the status is showing as complete. Appreciate if provide guidance how to analyse the issue. The message is read as below: Deadline Missed: Invoice# 5

  • Date formatter in ADF BC

    I am seeing a date issue in my application. There is a CreatedDate column in my DB table. When the date is displayed in the view, the following pattern is used. <af:outputText value="#{row.CreatedDate}" id="ot1"> <af:convertDateTime pattern="#{bindin

  • How to define the size of private folder in Easy DMS?

    Hi, I have to ristrict the user to keep  the data in private folder after the maximum limit please help me how to define the private folder size in easy DMS. after the limit user is not able to keep data in private folder.