Help reg: Removing sel records in af:table and to prevent it from Commit

I have a af:table in a page with some records.The table is editable and the records in the table are fetched from the DB. Now, I edit some of the records in the table.
I would now like to delete one of the edited records.
The delete action listener method should remove the record from the table and when I click save on the page (to save the other edited records), the removed record should not get committed to the database.At the same time, the removed record (from the table) should not get deleted from the database either.
Can someone suggest on how can i achieve this?
I use a delete action listener method to remove the record from the table in the UI but not sure how to prevent the removed record from getting committed (since its been modified).
Thanks
Sreekanth Vijay

If you remove a row with the delete method, the row will be deleted from the db if you don't change the eo behavior.
You can, as mentioned in the last post, use the remove from collection to remove three row from the current repeat without removing it from the db. To get three row back you have to execute the query again.
Timo

Similar Messages

  • Please Help me in inserting record in a table

    Hi,
    Kindly help me on how to insert records in a table that the values are from the another table.
    for example :
    i have table1, all of the records in column1 of table1 will be inserted to table2 column2 . .
    I already tested it to a visual foxpro programming language and it's ok, i used this command :
    *"INSERT INTO table1 (column1) SELECT column2 FROM table2"*
    but when I try it to a JAVA Program, there's an error.
    Please help me.. Thank You.

    Sir, this is what you mean?
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
    at com.mysql.jdbc.Connection.execSQL(Connection.java:3256)
    at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1313)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1585)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1500)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1485)
    at remittance.utility.security.frmRole.addtoPermission(frmRole.java:197)
    at remittance.utility.security.frmRole.btnADDActionPerformed(frmRole.java:177)
    at remittance.utility.security.frmRole.access$200(frmRole.java:22)
    at remittance.utility.security.frmRole$3.actionPerformed(frmRole.java:92)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
    at java.awt.Component.processMouseEvent(Component.java:5517)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
    at java.awt.Component.processEvent(Component.java:5282)
    at java.awt.Container.processEvent(Container.java:1966)
    at java.awt.Component.dispatchEventImpl(Component.java:3984)
    at java.awt.Container.dispatchEventImpl(Container.java:2024)
    at java.awt.Component.dispatchEvent(Component.java:3819)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
    at java.awt.Container.dispatchEventImpl(Container.java:2010)
    at java.awt.Window.dispatchEventImpl(Window.java:1791)
    at java.awt.Component.dispatchEvent(Component.java:3819)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

  • Need help to fit the records of a table into a particular region

    Hi All,
    Need help in getting the records of table to be fitted into a particular region provided for it. But in my case as the records increases the textbox below are moving down accordingly into next page that i dont want.  
    As shown in the below image i have to fit 22 no. of records in that given area only not disturbing the below textbox alignments.
    Thank in advance...
    Sreekanth Note: Please vote/mark the post as answered if it answers your question/helps to solve your problem.*****

    Hello,
    In SSRS, Report items within a report can be
    kept together on a single page implicitly or explicitly by setting the keep with group or keep together properties.
    In your case, you can try to specify the "KeepTogether" property to True on the Table properties windows.
    If there are other report items  under or above the Table and you want keep all items on the single page, you can try to add a Rectangle and put all items into the Rectangle.
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • Reg : first inserted record in a table

    Hello all,
    Could any of you help me in writing a query to get the first
    inserted record into a table.
    Suppose I've the following table :
    my_table : structure
    Name Null? Type
    ID NOT NULL NUMBER
    Ive inserted value 20 into the table first, and then inserted
    value 10. I want to retrieve the first inserted record with
    value 20. How do I write the query for that ??????
    Awaiting for the reply,
    Thanks in Advance...
    Srini

    One small disagreement with Andrew's posting, but
    rownum is assigned to rows after they have been identified
    as part of the result set, but before the ORDER BY is
    applied. Hence the two queries ...
    select * from my_table
    where rownum = 1
    order by id ASC
    ... and ...
    select * from my_table
    where rownum = 1
    order by id DESC
    ... will probably return the same result.
    However in neither case is the result guaranteed to be the
    first inserted row.
    If you had created a table very recently, and it had only a
    single extent, you could get the first row of the first block of
    that extent with ...
    select * from my_table where rowid =
    (select min(rowid) from my_table)
    ... but as Andrew says, the only way to do the job properly is
    to timestamp the rows as they are inserted. Anything else
    would only be of theoretical interest.

  • How to insert some records in one table and some records in another table

    Interview question
    how insert records in two tables by using trigger
    CREATE or REPLACE TRIGGER Emp_Ins_Upd_Del_Trig
    BEFORE delete or insert or update on EMP
    FOR EACH ROW
    BEGIN
    if UPDATING then
    UPDATE emp2
    SET
    empno = :new.empno,
    ename = :new.ename
    --, job = :new.job
    --, mgr = :new.mgr
    --, hiredate = :new.hiredate
    , sal = :new.sal
    --, comm = :new.comm
    --, deptno = :new.deptno;
    sdate = :new.sdate,
    edate = :new.edate
    end if;
    if INSERTING then
    INSERT INTO emp2
    VALUES
    ( :new.empno
    , :new.ename
    --, :new.job
    --, :new.mgr
    --, :new.hiredate
    , :new.sal
    --, :new.comm
    --, :new.deptno
    new.sdate,
    new.edate);
    end if;
    if DELETING then
    DELETE FROM emp2
    WHERE empno = emp2.empno;
    end if;
    END;
    it is working fine but he wants to insert some specific litimit on one table and some specified limit of records in one ..
    In this senerio can i insert records by use count of records...
    please help me..

    Can you be more specific on the "Limit"
    Conditional insert can be used in this case.

  • Delete records in a table and at the same time print out for reference

    I am working on a req to delete some records from a table and at the same time, record/print the deleted records in the outstream (DBMS_OUTPUT.PUT_LINE)
    DECLARE
    v_rec_po hst_po%ROWTYPE;
    BEGIN
    DELETE FROM hst_po po
    WHERE abbrpoid = '&opportunity_code'
    AND updatedby = (SELECT employeeid
    FROM tes_employee
    WHERE name = &emp_name)
    AND audittimestamp BETWEEN TO_DATE ('&start_timestamp',
    'DD-MON-YYYY HH24:MI'
    AND TO_DATE ('&end_timestamp',
    'DD-MON-YYYY HH24:MI'
    END;
    I was thinking of using returning into and then using DBMS_output to pull out the delted records, but there will be multiple rows deleted fro this statements. I am stuck here..Can anyone help

    How about:
    SQL> create table t
      2  (x int)
      3  /
    Table created.
    SQL> insert into t
      2  select rownum
      3    from all_objects
      4   where rownum <= 10
      5  /
    10 rows created.
    SQL> declare
      2     cnt pls_integer;
      3  begin
      4     delete from t;
      5     cnt := sql%rowcount;
      6     dbms_output.put_line ('Removed: '||to_Char (cnt));
      7  end;
      8  /
    Removed: 10
    PL/SQL procedure successfully completed.Edited by: Alex Nuijten on Jun 4, 2009 8:58 AM

  • Reg: Data getting repeated in the table and displayed in the Smartorm.

    Hello Experts,
    Requirement is to display header data from kna1table and item data from two tables faglflexa and bsid.
    Layout is something like this.
    Name and Address is capture from KNA1.
    Item Details from faglflexa and BSID based on one condition, UMSKZ ne 'X' and 'Y' for the respective KUNNR from KNA1.       First Item table.I have taken a separate internal table from print program
    Item Details from BSID only based on one condition, UMSKZ eq 'X' and 'Y' for the respective KUNNR from KNA1. Second Item table. I have taken a separate internal table from print program
    Calculation based on faglflexa and BSID table on one condition,UMSKZ ne 'X' and 'Y' for the respective KUNNR from KNA1.       Third t Item table. Data from the first internal table
    The complete thing should be displayed on Smartform for one Customer (kunnr). Then should go to the next customer.
    I have a written a code like this, For Example.
    loop at kna1 into w_kna1.
    Used Table1 in smartform and give a loop to display the item details based on first internal table.
    display itemdetails
    Used Table2 in smartform and give a loop to display the item details based on second internal table.
    display itemdetails.
    Used Template to display the item details to display the item details based on first internal table.
    endloop.
    Now my problem is table 1 is coming fine. table 2 data is getting repeated for all the customers based on 1st customer data, how should i clear the workarea after every customer.
    Similar pbm for the template which i'm using.
    Please help me on this.
    Thanks in advance.
    Abdur Rafique

    Hi Vishnu,
    Thanks for replying. I cant use one single table to display the output. There are several conditions in two tables.
    I have corrected the error of repetition data. Logic i will mention it below.
    loop at kna1 into wa_kna1.
    for header data " this is main table
    loop at item_1  into wa_item_1. " for first item table
    Data displayed.
    loop at item_2 into wa_item_2. " for 2nd item table
    Data displayed.
    endloop. " for 2nd item table
    data calculation based on first item table.
    endloop. " this is for first item table
    endloop." this is for 2nd item table.
    The data which is there in the 2nd item table should display data based on the kna1 loop. Data is displaying properly but not in 1 table, say for example.
    kunnr- 1000010
    there are 9 items.
    All the 9 items should be in 1 table. But here it is displaying 1 item in 1 table till 9 items in 9 tables.
    I need to club all the 9 items in 1 table.
    One more doubt is 2 items have same belnr (document number) i need to club this and add the wmbtr field and then display as 1 record.
    So final records in 2nd item table should be 8 not 9.
    Can you please help me on this.
    Thanks in advance.
    Abdur Rafique

  • HELP! FOR LOOP TO SCROLL THROUGH TABLE AND CREATE DATABASE LINK

    Hi,
    Here's the scenario, not much of a PL programmer, just basic SQL so really need some help people!
    I have 2 tables. 1 contains list of DB's and the other contains rules to follow.
    I need to create a loop that goes through the table containing the DB's and on each row a DB link is created (Only 1 link allowed!)
    Once created, the schema currently logged in with also has an account on the linked DB in order to run scripts- The scripts are stored centrally hence the requirement for the link to the target DB.
    There are numerous scripts that need to be executed and can all be called from 1 script, once executed the loop exists and the database link needs to be dropped.
    Once dropped, the first loop continues, creating a DB link for the next DB listed in the table (and all the scripts are fired again)
    This continues against all the DB's listed in the table.

    Hi BlueShadow,
    Thanks again for the response, you've hit the nail on the head. SQL scripts on a unix server, a loop goes through a table 1 at a time. Each row gets a link created and then all the scripts stored on the server are executed against the db linked to. So I'm assuming this is a loop within a loop.
    1 loop to go through the table to create the link and then another loop within once connected to execute all the scripts against the connected DB. Once the scripts are run, the loop exits and moves onto the next server and so on until all the servers have the scripts are run.
    It's PL/SQL scripts we're after and not shell scripts as this would free us from the OS constraints.
    We have to drop the links due to security. Any idea on o

  • Mac mini 2009 mavericks won't boot. Blank display no logo,etc. Tried all keyboard boot functions, no help. replaced RAM w/known good. No help. Removed HD mounted in external enclosure and ran permissions and repair. No help. Upgraded HD to Yosemite a

    Mac mini 2009 Mavericks won't boot. Chimes and power light comes on. USB ports have power. Blank display no logo,etc. Tried all keyboard boot functions, no help. Replaced RAM w/known good. No help. Removed HD and mounted in external enclosure and ran permissions and repair. No help. Upgraded HD to Yosemite and was able to boot another mini from HD mounted in external enclosure, reinstalled HD still no boot. Any ideas on how to proceed appreciated.

    - Make an appointment at the Genius Bar of an Apple store. You have a hardware problem.
      Apple Retail Store - Genius Bar

  • How to get orphan records in Wf_notifications table and how to purge records in WF notifications out table

    Hi Team,
    1) I need Query to get the orphan records in the wf_notification tables to purge them.
    2) Same way I need to purge unwanted records in WF NOTIFICATION OUT table.Can you please let me know the process to get unwanted records in
    WF NOTIFICATION OUT table and the process to purge them.
    Thanks in Advance!
    Thanks,
    Rakeesh

    Hi Rakeesh,
    Please review notes:
    11i-12 Workflow Analyzer script for E-Business Suite Workflow Monitoring and Maintenance [Video] (Doc ID 1369938.1)
    bde_wf_data.sql - Query Workflow Runtime Data That Is Eligible For Purging (Doc ID 165316.1)
    What Tables Does the Workflow Purge Obsolete Data Program (FNDWFPR) Touch? (Doc ID 559996.1)
    Workflow Purge Data Collection Script (Doc ID 750497.1)
    FAQ on Purging Oracle Workflow Data (Doc ID 277124.1)
    Thanks &
    Best Regards,

  • Split the records of interanl table and upload it to fields

    Hi All,
    I have a internal table filled with records in following format.
    XXXXXXXX~~Export the invoice
    2~19980501~19980531
    // The first invoice:
    0~00130698114000010004119980512059611000276233.350.1711076.66????321000789010005???????????????????130601000000000??????????18? 3352051????532611-3357211???~~~
    0~????????176233.350.1711076.6676233.350~1510
    // The second invoice:
    0~00130698114000010007219980512059611000440482.000.175882.00????110108078901007?????????61? 68744479?????????????462088-07?????130601000000000??????????18? 3352051????532611-3357211???????????~~~
    0~????????139780.000.175780.0039780.000~1510
    0~????3.5"10702.000.17102.0070.20~1510
    I want to sort this out field by field and fill it to the respective fields.
    If i try to do so with work area
    read table itgt_frmgto into  waitgt_frmgto index 4.
    i have a out put of one line that is 4th.Butbbecause these are random records,i cannot count on lines .So i have to go by fields.
    Could anybody tell me how to do this with multiple lines coming in without using
    index concept.
    Thank you,
    Priya

    hi,
    loop the table and inside the loop split each line into other variables if the line has a fix structure or split into an another itab if not.
    SPLIT <line> AT '~~' INTO <f1> ... <fn>.
    or
    SPLIT <line> AT '~~' INTO <itab>.
    you might want to take a look at the syntax of SPLI statement.
    br

  • Complicated Question (see pdf): Use data from one table to find the same data in a second table and take other data from that table and place it in a third table. :)

    I don't even know if this is posible.
    I'm using iwork '09 
    View PDF

    I hope I can clarify:
    For our purposes here:
    Table 1 = "Step 2 - Product Sizes"
    Table 2 = "Option id Master"
    Table 3 = "Export - Product Info"
    Table 1:
    The user would enter values for "productcode," "Horz," and "Vert"
    "Size" would auto fill based on values in Horiz and Vert (I have this taken care of already).
    Table 2: This is a completely static table that I want to search against. - Data from other tables in the doc does not alter or change the data in this doc.
    We just want to look at table 2. Find the existing value in "table 2 : size" column that matches the "table 1 : size" column  and then pull the "optionids" and "productprice" from that row.
    Can the value from "Table 1 : Size" be used as a search term in "Table 2 : Size?"
    Table 3: The user does not enter any values on this table. 
    "productcode" is pulled from table 1 - "Table 1 :: A5" = "Table 3 :: A5"
    "optionids" and "productprice" are pulled from Table 2 columns "D" and "E" - however we do not know which Table 2 row it is pulling from until we enter data in Table 1.
    As I'm writing this I'm realizing that
    A. this is probably really confusing to you.
    B. this may be impossible inside of numbers.
    If you have some other method that would facilitate the same out come but be structured differently please let me know.
    --- maybe to help you understand further what I am doing here is my current workflow:
    I record the size of a piece of art.
    Then I manually go to my "Option id Master" and find the same size.
    I then copy the corresponding "optionids" and "productprice" cells. (these options control the prices displayed on my website)
    I got to my "Export - Product Info" table and paste the values in the corresponding cells.
    I was hoping to automate this as it takes a long time when you have hundreds of products.
    Thanks for the help!

  • Dynamic Column Names from one table and its corresponding values from another table

    I have 2 tables. First tables gives the specification if a column is required or not. we have the 2nd table with the same column name where we provide the actual values.
    I want to select all the required columns from the 1st table and retrieve the values for those from the 2nd table. Both this i want to achieve in a single select statement.

    This wil require a dynamic Query with a Pivot
    DECLARE @ColsPivot as VARCHAR(MAX);
    DECLARE @Query  AS VARCHAR(MAX);
    1. Retreive the ID for all required field
    SET @ColsPivot = (SELECT STUFF((SELECT  ',' + quotename(CAST([RequirementID] as varchar(3))) FROM [dbo].[Requirement] WHERE required=1 FOR XML PATH(''), TYPE).value('.', 'NVARCHAR(MAX)') ,1,1,''));
    This will give you : [1],[2],[3],[8],[9],[14] for exemple.
    2. Build your Query
    SET @Query ='SELECT ClientID,'+@ColsPivot+''
        FROM (
            SELECT [ClientID],[RequirementID],[Value]
            FROM dbo.RequirementValue
            WHERE ClientID=@CliendID --Optional SP parameter
        )src
              PIVOT(
                MAX(Value)
                for [RequirementID] in ('+@ColsPivot+')
        ) p';
    3. Exec(@Query);

  • How can I easily remove/uninstall itunes 11,  its components, and all my songs from a windows 7 laptop?

    My Compaq's 38gb disk C is full, rendering my itunes library unworkable. I'd really like to know how to wipe my computer clean of itunes and all related files. Then I hope to reinstall itunes and import my songs from my external hard drive to disk D with 77gb of available storage.
    Any help will be very much appreciated.

    Thanks for getting back to me, Niel
    Maybe I should step back and say that I was in the process of importing my whole library from a 2003 Powerbook G4 via an external hard drive when my Compaq's disk C filled up. Then I started uninstalling programs from disk C and adding more itunes files. Now my itunes library is a real mess with parts of albums in different áreas, and compilation albums transferred as individual songs... Even after all that, over half my songs still need to be imported into itunes. Since I'm a real novice at all this, I'm wondering if a frest start might be the easiest way to clean this mess up.

  • Question reg. modifying latest record in internal table

    Can you tell me if it is possible to modify the last appended record to the internal table?
    I just want to modify the record in the internal table which is appended at the latest. Please tell me the logic for this.
    Thanks a lot,
    Krishen

    Hi try with this:
    DATA line TYPE I.
    DATA wa_itab TYPE LINE OF it_itab.
    DESCRIBE TABLE IT_TABLE LINE line.
    READ TABLE IT_TABLE INTO wa_itab INDEX line.
    WA_TABLE-FIELD = 'new value'.
    MODIFY TABLE IT_TABLE FROM wa_itab
           TRANSPORTING field.
    Best regards.

Maybe you are looking for

  • Can we use this forum in OutlookExpress NewsGroup?

    My MSN address is "[email protected]", i would like to make friends on Oracle with you, would you like to join me? By the way, i want to know if we can discuss questions in OutlookExpress, how can we make it? Loginning in the web site is not so conve

  • OBIEE 11.1.1.6 different layer hierarchies

    Hi experts, I want to know whether the following layout is implemented. How to create different layer hierarchy in BMM in OBIEE 11.1.1.6? If it does work , I want to drag this hierarchy into presentation. Please help me as soon as possible. Thanks. F

  • Set Maximum on {tag_totalunits}

    We are trying to limit the number of units ordered through the checkout. We want orders in which the {tag_totalunits} is greater than 75 to prompt the user to use the quote form instead of the buy form. Since the code for the input is generated by BC

  • Appleworks 5 files won't work with Pages, appearing as UNIX files

    I realize Pages will not open Appleworks 5 files. However, for some reason, when I copied my Appleworks 5 files onto a hard drive and put them on my PPC G4 iBook running OS 10.4, the icons for the files are appearing as unix executable files. I had n

  • IDXML - Help with the rights for the "useerGroupsProfile" command

    On page 121-122 of the developer guide for CoreID - It mentions that in order to use the IDXML command for "userGroupsProfile" that the "The logged-in user must be able to grant read capability on the proxysourceuid classname attribute" I am pretty s