Delete and Commit

Hello,
I drag and dropped delete operation and commit on top of the delete button(bind to existing button) However delete is disabled always.
How can I acheive delete and commit in button?
Thanks in advance

The simplest way is to:
(1) Create a custom method on your application module
(2) Publish that method on the application module's client interface
(3) Drop the custom method as a button onto your form.
When you click the button created in step 3, it invokes the code in your application module method automatically.
Assuming you are wanting to delete the current row from a view object instance named "EmpView" in your application module's data model, your method would look like this:
public void deleteCurrentEmpAndCommit() {
  Row empRow = getEmpView().getCurrentRow();
  if (empRow != null) {
    empRow.remove();
    getDBTransaction().commit();
}I believe you requested a pre-release of the ADF Developer's Guide for Forms/4GL Developers from me. The steps to create and publish custom methods on an application module are covered in sections:
8.3, "Adding a Custom Service Method"
8.4,"Publishing Custom Service Methods to Clients"
10.3.3, "How the Data Model and Service Methods Appear in the Data Control Palette"

Similar Messages

  • How to combine Submit and Commit into a single operation?

    JDev 11.1.1.6
    Is there a simple way to combine Submit and Commit or Create and Commit or Delete and Commit into a single operation without creating a custom Operation class?
    Thanks,
    PeeVee

    Have a button and in the action listener event..you should drag and drop both create & commit onto your page so that it will have the required bindings in the pagedef.
    OperationBinding createOperationBinding = ADFUtils.getOperationBindingForMethod("Create");
    createOperationBinding.execute();
    OperationBinding commitOperationBinding = ADFUtils.getOperationBindingForMethod("Commit");
    commitOperationBinding.execute();

  • NFS Commnication channel errors for deleting and placing

    Hi All,
    I was trying File to file scenario.
    I am picking the file from App server(AL11) using NFS Adapter and the processing Mode is Delete
    In comm channel monitor it showing an error as
    Sender channel error:
    Error: File '/staging/INTERFACE/SAP/ca/kar370.txt' - deleting after processing failed
    Same way while placing the file
    Receiver channel error:
    Error: Message processing failed: FileNotFoundException: /staging/INTERFACE/SAP/ca/test120110906-122051-980.txt (Permission denied)
    Whether i dont have the permission to delete and place the file from and to the App server(AL11)?
    What is the procedure in order to make it possible.
    Thanks
    Sai

    Hi All,
    Thanks to every one.
    The problem is solved ,
    Basis Guy has given the permissions, and i am able to place and delete the files .
    Thanks
    Sai

  • Problem in Creating new row & inserting data using CreateInsert and Commit

    Hello All,
    I have created a page there are few input text and i want to insert the data into a database table. I have created an Application Module I am using CreateInsert and Commit operation but there is one problem.
    At first it created a row in database after that it is not creating the new row instead it is updating the same row with the new values.
    In bindings of my jspx page I have created two binding for action (1) CreateInsert for the VO of that Application Module (2) Commit operation of that Application Module.
    Here is the code snippet of my application:
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding = bindings.getOperationBinding("CreateInsert");
    Object result = operationBinding.execute();
    *if (!operationBinding.getErrors().isEmpty()) {*
    return null;
    OperationBinding operationBinding1 = bindings.getOperationBinding("Commit");
    Object result1 = operationBinding1.execute();
    *if (!operationBinding1.getErrors().isEmpty()) {*
    return null;
    I have tried using Execute+Commit and Insert+Commit case also in every case it is updating the same row and not inserting a new row.
    Is there anything I am missing?
    Please Help.

    hi user,
    i dono. why are trying with codes. adf provides zero lines codes.
    a wonderful drag and drop functionality provide by the framework.
    while double click the button the codes are  registered in your bean
        public String cb6_action() {
            BindingContainer bindings = getBindings();
            OperationBinding operationBinding = bindings.getOperationBinding("CreateInsert");
            Object result = operationBinding.execute();
            if (!operationBinding.getErrors().isEmpty()) {
                return null;
            return null;
        public String cb8_action() {
            BindingContainer bindings = getBindings();
            OperationBinding operationBinding = bindings.getOperationBinding("Commit");
            Object result = operationBinding.execute();
            if (!operationBinding.getErrors().isEmpty()) {
                return null;
            return null;
        public String cb7_action() {
            BindingContainer bindings = getBindings();
            OperationBinding operationBinding = bindings.getOperationBinding("Delete");
            Object result = operationBinding.execute();
            if (!operationBinding.getErrors().isEmpty()) {
                return null;
            return null;
        public String cb14_action() {
            BindingContainer bindings = getBindings();
            OperationBinding operationBinding =
                bindings.getOperationBinding("Delete4");   // some different here. after deleting usually do commit
            OperationBinding operationBinding1 =  
                bindings.getOperationBinding("Commit");    // so here commit operation.
            Object result = operationBinding.execute();
            Object result1 = operationBinding1.execute();
            if (!operationBinding.getErrors().isEmpty()) {
                return null;
            if (!operationBinding1.getErrors().isEmpty()) {
                //add error handling here
                return null;
            return null;
        }if am not understud correctly. please some more explanation need.

  • Issue with Transporting Trans and Comm Structure

    Hi Experts,
    Recently we moved an Infosource ( with Transfer structure and Comm stucture) from D to Q. After movement we checked teh Transport log and we see a warning that says
    " R3TRROUT458SEFRDF2PUBJRIZGZAOPSNB not found, object also deleted in target system"
    From teh object name it appears like a routine. But how do we know the actual name of the routine so that we can see in find out and compare betwn systems.
    Thanks
    DVMC

    Hi,
    If you want to find the objects using only technical name, use the table TADIR.
    In your case execute this table and give the technical name
    '458SEFRDF2PUBJRIZGZAOPSNB' (Removed R3TR and ROUT).
    Then you can get the routine details.
    Regards,
    Vivek V

  • Delete and Rename External User

    I'm trying to delete and rename EXTERNAL (foreign) users in GroupWise via the AdminObject API. I can create them no problem and I can change their attributes no problem (e.g. givenName, sn). However, when I try and delete or rename, the call succeeds, but the object is not deleted on a delete and not renamed on a rename.
    For a rename, I am assigning a new AccountID and then doing a commit. The call executes, but the account is not renamed.
    Is there something special about External Users I'm missing? I'm doing this in Visual Basic. Thanks.
    Matt

    I figured out what I was doing wrong on the delete. I was doing a commit after the delete! So I think I was basically re-adding the External User. So once I stopped that, I was able to delete External Users.
    But I still cannot figure out how to rename one. I was changing AccountID. That's really not what I want to do, I need to change the MailboxID, but that is read only. How can I rename an External User?
    Thanks.
    Matt

  • WARNING, WARNING - Delete and AutoCommit

    I've just hit a bug which has cost me a couple of days work and a fair bit of hair loss!
    Deleting data seems to autocommit. You cannot roll it back even though the autocommit button is off.
    There should be flashing lights in the front of the app saying that this doesn't work.
    Another thing - auto commit should not be available as an option as its just wrong/bad.. you name it. Remove it please, pretty please.
    Please fix.

    I was sure that I had successfully rolled back deletes and I have just confirmed that it works fine for me (just picked a log table I have been working with that I didn't care about the data in).
    select count(*) from table;
    43366
    delete from table where rownum < 10;
    Message: 9 rows deleted
    select count(*) from table;
    43357
    rollback (via toolbar icon)
    Message: Rollback complete
    select count(*) from table;
    43366
    As far as the Auto Commit option - I wouldn't use it myself, but I can't see a problem with it being available for people to use if they want. I would definitely want it to be off by default, but it is.

  • Iv downloaded the 0845 wizard from the App Store. Registered my details and it has been working. But for some reason it won't let me log in and keep saying failed every time I try to use it. Iv deleted and re-downloaded the app and it still says the same?

    Iv downloaded the 0845 wizard from the App Store. Registered my details and it has been working. But for some reason it won't let me log in and keep saying failed every time I try to use it. Iv deleted and re-downloaded the app and it still says the same?

    I would say to start by looking on their web site... unfortunately, that appears to be dead.
    Based on the horrible ratings on the App Store (1 star for the current version), I'm not surprised it doesn't work well.

  • My itunes will not work at all. i have deleted and reinstalled in over ten times, i have ended the process, i have reinstalled quicktime i few times, i have deleted many folders. What else can i do? Please help:(

    My itunes will not work at all. i have deleted and reinstalled in over ten times, i have ended the process, i have reinstalled quicktime i few times, i have deleted many folders such as TEMP, itunes helper et What else can i do? Please help:(

    Now it sometimes keeps coming up and working but once i plug an ipod in it freezes my whole computer up and no i dont get any response from itunes at all

  • I have the iPhone 4, and yesterday I synced my photos onto iTunes, but now I have albums on my phone that cannot be deleted, and there is not an option to delete the items in the albums individually... How do I get rid of these unwanted albums? Windows 7

    I have the iPhone 4, and yesterday I synced my photos onto iTunes, but now I have albums on my phone that cannot be deleted, and there is not an option to delete the items in the albums individually... How do I get rid of these unwanted albums? Using Windows 7.

    If you used iTunes to get the photos on the phone, then use the same iTunes and uncheck the music you don't want and do another sync.

  • When I plug my iPhone in to my computer, iTunes doesn't recognize it as a device.  I have deleted and re-downloaded iTunes twice which seems to fix the problem temporarily but then the next time, the device is not recognized.

    when I plug my iPhone in to my computer, iTunes doesn't recognize it as a device.  I have deleted and re-downloaded iTunes twice which seems to fix the problem temporarily but then the next time I plug my phone in, the device is not recognized.

    What happens if you go to iTunes > File > Devices, do you get the option to Sync iPhone?
    You could try a reinstall of iTunes. OS X Yosemite: Reinstall apps that came with your Mac

  • Problem with sqlldr and commit

    Hi,
    i have a problem with sqlldr and commit.
    I have a simple table with one colum [ col_id number(6) not null ]. The column "col_id" is primary key in the table. I have one file with 100.000 records ( number from 0 to 99.999 ).
    I want load the file in the table with sqlldr ( sql*loader ) but i want commit only if all records are loaded. If one record is discarded i want discarded all record of file.
    The proble is that in coventional path the commit is on 64 row but if i want the same records of file isn't possible and in direct path sqlldr disable primary key :(
    There are a solutions?
    Thanks
    I'm for the bad English

    This is my table:
    DROP TABLE TEST_SQLLOADER;
    CREATE TABLE TEST_SQLLOADER
    (     COL_ID NUMBER NOT NULL,
         CONSTRAINT TEST_SQLLOADER_PK PRIMARY KEY (COL_ID)
    This is my ctlfile ( test_sql_loader.ctl )
    OPTIONS
    DIRECT=false
    ,DISCARDMAX=1
    ,ERRORS=0
    ,ROWS=100000
    load data
    infile './test_sql_loader.csv'
    append
    into table TEST_SQLLOADER
    fields terminated by "," optionally enclosed by '"'
    ( col_id )
    test_sql_loader.csv
    0
    1
    2
    3
    99999
    i run sqlloader
    sqlldr xxx/yyy@orcl control=test_sql_loader.ctl log=test_sql_loader.log
    output on the screen
    Commit point reached - logical record count 92256
    Commit point reached - logical record count 93248
    Commit point reached - logical record count 94240
    Commit point reached - logical record count 95232
    Commit point reached - logical record count 96224
    Commit point reached - logical record count 97216
    Commit point reached - logical record count 98208
    Commit point reached - logical record count 99200
    Commit point reached - logical record count 100000
    Logfile
    SQL*Loader: Release 11.2.0.1.0 - Production on Sat Oct 3 14:50:17 2009
    Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
    Control File: test_sql_loader.ctl
    Data File: ./test_sql_loader.csv
    Bad File: test_sql_loader.bad
    Discard File: none specified
    (Allow all discards)
    Number to load: ALL
    Number to skip: 0
    Errors allowed: 0
    Bind array: 100000 rows, maximum of 256000 bytes
    Continuation: none specified
    Path used: Conventional
    Table TEST_SQLLOADER, loaded from every logical record.
    Insert option in effect for this table: APPEND
    Column Name Position Len Term Encl Datatype
    COL_ID FIRST * , O(") CHARACTER
    value used for ROWS parameter changed from 100000 to 992
    Table TEST_SQLLOADER:
    100000 Rows successfully loaded.
    0 Rows not loaded due to data errors.
    0 Rows not loaded because all WHEN clauses were failed.
    0 Rows not loaded because all fields were null.
    Space allocated for bind array: 255936 bytes(992 rows)
    Read buffer bytes: 1048576
    Total logical records skipped: 0
    Total logical records read: 100000
    Total logical records rejected: 0
    Total logical records discarded: 0
    Run began on Sat Oct 03 14:50:17 2009
    Run ended on Sat Oct 03 14:50:18 2009
    Elapsed time was: 00:00:01.09
    CPU time was: 00:00:00.06
    The commit is on 992 row
    if i have error on 993 record i have commit on first 992 row :(
    Edited by: inter1908 on 3-ott-2009 15.00

  • I have 2 email addresses set up on my iphone 5, 1 can send mail and the other can't... have tried deleting and adding the account, no luck, have tried all suggestions... anyone help?

    I have recently purchased the iphone 5S and have two AOL email accounts set up on it. They could both receive and send mail on the first day, but from the second day only 1 can send mail (both still receive). I get an message saying "Unable to send mail. A copy has been placed in your Outbox. Sending the message content to the server failed." This has been the response now for 3 days and suddenly this morning, I was able to send an email from this account, but only the one and now it's back to that same message. I have deleted and added the account again, using various methods. I even reset my phone and set it all up again from beginning with no luck. It is very frustrating and I am unsure why I can't send from both accounts, especially being that they are the same provider. I have read forums and it appears many have this same problem and I wondered if anyone has had it recently on this phone and how they fixed it. Someone said just use the AOL app to send from this account, yes that can be done, but it's inconvenient having to sign in all the time when i have a mail app that should work automatically. Any suggestions would be welcomed!!

    I am not sure if this issue is going to help you but lets give it a try.
    I know that where im from, which is the Netherlands, I am not able to sent e-mails from my iPhone or any other mobile device by using 3G or a random WIFI acces point. The provider only allowes you to sent e-mails when you are connected to a network of there own. Which means if you have provider "101" and your email settings are set up for this provider in your iPhone but your using the network of a friend of yours which is provider "202" you cannot sent emails from his network. Though you can receive them you may not sent.
    As I said, I am not aware if this issue is the same for you totaly depents on the country and provider your using.

  • File.delete() and File.deleteOnExit() doesn't work consistently..

    I am seeing some odd behavior with trying to delete files that were opened. Usually just doing new File("file.txt").delete() would work. However, in this case, I have created an input stream to the file, read it in, saved it to another location (copied it), and now I am trying to delete it.
    The odd thing is, in my simple application, the user can work with one file at a time, but I move "processed" files to a lower pane in a swing app. When they exit it, it then archives all the files in that lower pane. Usually every file but the last one opened deletes. However, I have seen odd behavior where by some files don't delete, sometimes all of them wont delete. I tried the deleteOnExit() call which to me should be done by the JVM after it has released all objects such that they don't matter and the JVM ignores any object refs and directly makes a call (through JNI perhaps) to the underlying OS to delete the file. This doesn't work either.
    I am at a loss as to why sometimes some files delete, and other times they don't. In my processing code, I always close the input stream and set its variable to null. So I am not sure how it is possible a reference could still be held to the object representing the file on disk.

    and then, in the other class
      public int cdplayerINIToMMCD(File aDatabase, String thePassword) throws IllegalArgumentException {
         /*---------DATA---------*/
         String dbLogin, dbPassword;
         JFileChooser fc;
         INIFileFilter ff;
         int dialogReturnVal;
         String nameChosen;
         File INIFile;
         ProgressMonitor progressMonitor;
         BufferedReader inFileStream;
         String oneLine;
         int totalLines = 0;
         int linesParsed = 0;
         boolean openDBResult;
         int hasPassword;
         if ((aDatabase == null) || (!aDatabase.exists()) ||
            (FileManagement.verifyMMCD(aDatabase) == FileManagement.VERIFY_FAILED)) {
            throw new IllegalArgumentException();       
         else { 
            currentDB = aDatabase;
            if(thePassword == null) {
              dbPassword = "";
            else { dbPassword = thePassword; }
            dbLogin = dbPassword; //For MSAccess dbLogin == dbPassword
         //Ask the user for the cdplayer.ini file.
         //Create a file chooser
         if (System.getProperty("os.name").indexOf("Windows") > -1) {
            fc = new JFileChooser("C:\\Windows");
         else {
            fc = new JFileChooser();     
         fc.setMultiSelectionEnabled(false);
         fc.setDragEnabled(false);
         //Create a new FileFilter
         ff = new INIFileFilter();
         //Add this filter to our File chooser.
         fc.addChoosableFileFilter(ff);
         fc.setFileFilter(ff);
         //Ask the user to locate it.
         do {
            dialogReturnVal = fc.showOpenDialog(mainFrame);
            if (dialogReturnVal == JFileChooser.APPROVE_OPTION) {
               nameChosen = fc.getSelectedFile().getAbsolutePath();
               if(nameChosen.toLowerCase().endsWith(INIFileFilter.FILE_TYPE)) { INIFile=new File(nameChosen); }
               else { INIFile = new File(nameChosen+INIFileFilter.FILE_TYPE); }
               if (!INIFile.exists()) {
                  continue; //If the name specified does not exist, ask again.
               else { break; }
            else { //User clicked cancel in the open dialog.
               //Ignore what we've done so far.
               return(IMPORT_ABORTED);
         } while(true); //Keep asking until cancelled or a valid file is specified.
         //Determine how many lines will be parsed.
         try {
           //Open the INI for counting
           inFileStream = new BufferedReader(new InputStreamReader(new FileInputStream(INIFile)));
           while ((inFileStream.readLine()) != null) {
               totalLines++;
           //Close the INI file.
           inFileStream.close();
         } catch (IOException ex) { return(IMPORT_FAILED); }
         //Make a progress monitor that will show progress while importing.
         progressMonitor = new ProgressMonitor(mainFrame, "Importing file","", 0, totalLines);
         progressMonitor.setProgress(0);
         progressMonitor.setMillisToPopup(100);
         progressMonitor.setMillisToDecideToPopup(1);
         //Make our DatabaseHandler to insert results to the database.
         dbh = new DatabaseHandler();
         //Open the database connection.
         do {
           try {
              openDBResult = dbh.openDBConnection(currentDB, dbLogin, dbPassword);
           } catch(JDBCException ex) { return(IMPORT_JDBC_ERROR); } //OUCH! can't write anything.
             catch(SQLException ex) {
                 openDBResult = DatabaseHandler.OPNCN_FAILED;
                 //Can not open the database. Is it password protected?
                 hasPassword = JOptionPane.showConfirmDialog(mainFrame, "Could not open the database. "+
                                                "The password is wrong or you have not specified it.\n"+
                           "Do you want to enter one now?", "New password?", JOptionPane.YES_NO_OPTION);
                if (hasPassword == MMCDCatalog.DLG_OPTN_YES) {
                   dbPassword = JOptionPane.showInputDialog(mainFrame, "Please enter your "+
                                                              "password for the DataBase:");
                    dbLogin = dbPassword; //For MSAccess, login == password                                                    
                //If the password wasn't the problem, then we can't help it.
                else { return(IMPORT_FAILED); }
         } while(openDBResult != DatabaseHandler.OPNCN_OK); //If it is OK, no exception thrown.
         //Import the ini file
         try {
            //Open the INI file for parsing.
            inFileStream = new BufferedReader(new InputStreamReader(new FileInputStream(INIFile)));
            //Read and parse the INI file. Save entries once parsed.
            while ((oneLine = inFileStream.readLine()) != null) {
               parseLine(oneLine);
               linesParsed++;
               progressMonitor.setNote("Entries imported so far: "+entriesImported);
               progressMonitor.setProgress(linesParsed);
               if ((progressMonitor.isCanceled()) || (linesParsed == progressMonitor.getMaximum())) {
                  progressMonitor.close();
                  break;
            //Close the INI file.
            inFileStream.close();
         } catch (IOException ex) {
              //Make absolutely sure the progressMonitor has disappeared
                progressMonitor.close();
                if (dbh.closeDBConnection() != DatabaseHandler.CLSCN_OK) {
                 JOptionPane.showMessageDialog(mainFrame, "Error while reading the INI file.\n"+
                    "Error while attempting to close the database", "Error", JOptionPane.INFORMATION_MESSAGE);
              else {
                 JOptionPane.showMessageDialog(mainFrame, "Error while reading the INI file.",
                                                    "Error", JOptionPane.INFORMATION_MESSAGE);     
                return(IMPORT_FAILED);
         //Make absolutely sure the progressMonitor has disappeared
         progressMonitor.close();
         //Close the database connection
         if (dbh.closeDBConnection() != DatabaseHandler.CLSCN_OK) {
            JOptionPane.showMessageDialog(mainFrame, "Error while closing the database after import.",
                                          "Error", JOptionPane.INFORMATION_MESSAGE);
         //Did the user cancel?
         if (totalLines != linesParsed) {
            return(IMPORT_ABORTED);     
         //Success!
         //Everything ok. Return the number of entries imported.
         return(entriesImported);
      }

  • Delete and close gap problem

    I have 2 project s  on 1 [delete and close gap] no work why?    on  premiere element 12

    djvalente
    What computer operating system is your Premiere Elements 12 running on? Have you updated 12 to the 12.1 Update using an opened project's Help Menu/Update? If not, please do so.
    For your immediate issue...
    Whether or not the command Delete and Close Gap works is typically dependent on the content above and below the
    spot where you want to delete and close gap. Manual closing of the gap (with care) with the mouse cursor may be your way.
    Please review the following details on how the Delete and Close Gap command can fail.
    ATR Premiere Elements Troubleshooting: PE: Delete and Close Gap Failures
    If you have any questions or need clarification, please do not hesitate to ask.
    Thank you.
    ATR

Maybe you are looking for

  • Appleworks won't open even after reinstall

    Okay folks, this one has me stumped. First, I'm working on my G4. I have two user accounts, a business account and a 'fun' account. My 'fun' account is my 'home' account, if that matters. Here is the problem: Appleworks stopped opening on my business

  • How can I represent a table with JSF ?

    Hi, I want to replace my (html) table with a JSF representation.. I found the tag <h:dataTable>, and this defines <h:column> but there is no <h:row> !! There is an attribute rows to represent the number of rows to display, but how can I add these row

  • Problems create PDF Printer in OSX

    With Acrobat 9 I have one PDF Printer, but with Acrobat X I don't know how I can do it. I need help.

  • Need Adobe Flash Player on my iPad please ... ;)

    need Adobe Flash Player on my iPad please ... ;)

  • PSE 8 on MAC 10.6.2 Resizing photos for web use

    Please can anyone assist me. I cannot alter the sampling options when resizing my photos to create smaller files for uploading to web pages. so at present Constrain proportions is ticked and I am unable to change it. W,H and R are locked Am unable to