[SOLVED] get modified row

Hi,
I'm using JSF, ADF BC, I have master detail relationship, for detail I'm using ADF table through which I'm changing detail data, on commit I want to delete all rows that WERE NOT modified. how can I do it, is there a method that returns rows that have been modified in entity object, or something similar.
Thanks in advance,
Tomislav
Message was edited by:
thundric

Hi,
see http://www.oracle.com/technology/products/jdev/tips/muench/mostcommon/index.html#businesstierentity
"Determine the state of the entity instance, irrespective of whether it has already been posted in the current transaction (but not yet committed)
getEntityState()
Note:      
Will return one of the constants STATUS_UNMODIFIED, STATUS_INITIALIZED, STATUS_NEW, STATUS_MODIFIED, STATUS_DELETED, or STATUS_DEAD indicating the status of the entity instance in the current transaction. "
Frank

Similar Messages

  • How to save the modified rows in jspx page usind adf default commit action

    Hi,
    We are displaying some columns of the database table in jspx page. Here we are using adf commit action to save these values to database which is updating all the rows by default. In this page there are some editable columns which the user can miodify. How can we update only these modified rows using default adf commit action. Also we want to update last_updated_date column of that particular row which is modified in the UI from backing bean .
    Can anyone please help us in solving this.
    Thanks in advance

    User,
    A key question - what are you using for the model layer (ADF Business Components, JPA, EJB, etc)?
    How are you determining that a "commit" action is updating rows (even those which haven't changed)?
    If you are using ADF Business Components - have a read in the documentation about history columns - the use case you describe (updating the last_udpdated_date column) is supported "out-of-the-box" for this.
    John

  • Getting Chained Rows with SQL-Loader

    Hi, I'm getting chained rows when loading data into an empty table. I always thought this could only happen when updating rows in a table. I'm loading into a datawarehouse, so I set the pctfree and pctused to use as much of the data blocks as possible. Here's the specs:
    pctfree 5, pctused 90 (blocksize 8k).
    The average rowsize is 1481 bytes.
    There will never be updates or deletes on this table. The table is always created new or truncated. How come does Oracle chain about 30 percent of the rows with the above values? I had to go down to pctfree 50 in order to get chained rows = 0.
    tia,
    Danny Smith

    - check if your table has check constraints (like column not null)
    if you trust the data in the file you have to load you can disable this constrainst and after the loader enable this constrainst.
    - Check if you can modify the table and place it in nologging mode (generate less redo but ONLY is SOME Conditions)
    Hope it helps
    Rui Madaleno

  • Getting correct row based on date

    Hi,
    if i have the following records for an account:
    now i have a date of 4-1-2013 and I want the row where either 4-1-2013 falls withing the BeginDt and EndDt OR if it does not fall within the BeginDt and EndDt, i wann the EndDt = null row.  So i should only get one row back each time, in this case I
    would get the first row back.
    thanks

    Hi,
    You can use BETWEEN statement to find rows where the date is between your date columns and you can use OR to get the second row if it's not inside the interval.
    There are other solutions, I've implemented this one:
    DECLARE @MyTable TABLE (OrgRoleNumTxt VARCHAR(20), BeginDt DATETIME, EndDt DATETIME);
    DECLARE @SearchDate DATETIME;
    INSERT INTO @MyTable
    SELECT '07238', '2013-01-01 00:00:00', '2013-06-30 23:59:59.997'
    UNION
    SELECT '07238', '2015-03-05 00:00:00', NULL
    -- Scenario #1: Returns the first record (between dates)
    SET @SearchDate = '2013-04-01';
    SELECT TOP 1 * FROM @MyTable WHERE (@SearchDate BETWEEN BeginDt AND EndDt) OR EndDt IS NULL ORDER BY BeginDt ASC;
    -- Scenario #2 (same query): Returns the second record (end date is null)
    SET @SearchDate = '2014-01-01';
    SELECT TOP 1 * FROM @MyTable WHERE (@SearchDate BETWEEN BeginDt AND EndDt) OR EndDt IS NULL ORDER BY BeginDt ASC;
    Hope this helps,
    Please use Mark as Answer if my post solved your problem and use Vote As Helpful if a post was useful.
    Pedro Martins
    Portugal
    https://www.linkedin.com/in/rechousa

  • Problem getting the row  element

    hi
        i have a scenario where  i have  filtered data from
       3 listboxes  and  populated the data in the  table .
      now  the table contains  about  10  rows  .
      now  i need to select a particular  row  in the  table 
       and  catch the particular row data  of the table .
    n is size of the table .     
    for(int i=0;i<n;i++)
                           if(wdContext.nodeIt_Car_Data_t().isSelected(i) {
    String model=wdContext.nodeIt_Car_Data_t().currentIt_Car_Data_tElement().getP_Model();
    String trim=wdContext.nodeIt_Car_Data().currentIt_Car_DataElement().getP_Trim();
    but  iam not able get the row data in the string where i am catching in
      it_car_data_t  is the  table node .  
    model  and  trim  are table elements . 
    how can i solve this ?

    hi
    thanks  for the reply  ,  but  the same issue .
    problem here is  when i am filtering the data for the Itemlistbox
              i am catching filtered data in the String
      and  then setting it to a Structue IT_CAR  as 
    Z_CAR_DATA car= new Z_CAR_DATA()
    car.setMake(make)
    next   adding this car to the   RFC 
    wdcontext.currentRFC.modelobject.additcar(car).
    not  i will get the filtered ddata in table . along with  some 
    extra data in the  table .
    now  i need to catch the row  data  then  again set it
    IT_CAR (which i have done above )
    data i am setting is not  going to IT_CAR structure  .
    because  after i get the data in the IT_CAR strucure i can
    data this to the RFC .
        can  any one help me out with this issue .
      i need to  get the  row of the table  and then  set it 
    to a structure  which  iam not able to .

  • How to track modified rows in ALV list

    I need to keep track of all the rows in the ALV list that the users have modified.  When the user selects SAVE, I need to read the modified rows and save the changes to the database.  I thought I could use mp_mod_rows but I cannot get the syntax and the variable declarations correct. 
    Thanks.
    Sandy

    Hi,
    R u using FM or.............
    If u r using FM look at my example.....
    data: LC_GLAY TYPE LVC_S_GLAY.
    LC_GLAY-EDT_CLL_CB = 'X'.<<<<<------
    gt_layout-zebra = 'X'.
    gt_layout-detail_popup = 'X'.
    gt_layout-colwidth_optimize = 'X'.
    ITAB1[] = ITAB[].<<<<<-----make a copy of ITAB for further comparision.
    call function 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = i_repid
    i_callback_user_command = 'USER_COMMAND1'
    it_fieldcat = header
    is_layout = gt_layout
    i_callback_top_of_page = 'TOP-OF-PAGE1'
    i_grid_title = text-h17
    it_sort = gt_sort[]
    i_default = 'X'
    i_save = 'U'
    is_variant = gt_variant
    it_events = gt_events
    I_GRID_SETTINGS = LC_GLAY<<<<<<------
    TABLES
    t_outtab = itab.
    clear itab.
    Form USER_COMMAND1
    FORM USER_COMMAND1 USING u_ucomm LIKE sy-ucomm
    us_selfield TYPE slis_selfield."#EC CALLED
    case u_ucomm.
    when '&DATA_SAVE'.<<<<<<<<----
    This will come after the data was EDITTED and when SAVE was clicked by user in output scren.
    Here now in the final internal table(ITAB) you can find the data changed in EDIT mode.
    After this you can do manipulation what ever you want.
    Thanks.
    If this helps you reward with points.

  • How can you get the Row at the mouse pointer??

    I got a JTable displaying info. I want to get the Index of the Row I click on.
    I can getX(), getY() with a MouseListener, but I am unable to get the row index related to these coordinates.
    Thanks!
    Olivier

    Sorry.
    That's ridiculous. I just found the rowAtPoint(Point point) method in JTable.
    Solved!!

  • To get selected rows from alv output which is prepared with funciton module

    Hi ,
    I have a program which is prepared ALV with funciton modules.
    Now i have to get selected rows(more than one).
    Can i use method CL_GUI_ALV_GRID -> get_selected_rows.
    or any other way to get selected rows.
    thanks,
    shyla

    Under the callback subroutine ( u have passed them in I_CALLBACK_USER_COMMAND of ur function module) - u do like this -
    DATA : ref1 TYPE REF TO cl_gui_alv_grid,
               t_selcted_rows type LVC_T_ROID.
    CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
    IMPORTING e_grid = ref1.
    call method ref1->get_selected_rows
    importing ET_ROW_NO = t_selected_rows.
    Hope this solves ur problem.

  • Cannot get all rows from cfProcResult

    We upgraded one of our servers (A) from CF 6 to 7.02. Another
    server (B) has CF 7.01.
    On server B (CF 7.01) the code works (below), all rows of
    each dataset are returned.
    Now on server A (CF 7.02) all of the resulting datasets have
    only the first record in them. If I add maxrows="-1" to each of the
    cfProcResult tags there is no change. If I change that to
    maxrows="100" then I can get the rows up to 100.
    Is this a bug or is there a different means to return all
    rows?

    It think its a bug. I got the same results under MX 7.0.2.
    The topic of maxrows recently came up on another thread. I
    did some searching and according to TechNote 18339 there was a
    change with maxrow
    "<cfquery maxrows=N> bug. ColdFusion MX (until ColdFusion
    MX 7.0.1 CHF2) didn't pass maxrows to the underlying driver
    (statement.setMaxRows())"
    Given the results you're getting, it sounds like CF is
    applying the maxrow to all of the resultsets, not just the one
    where maxrows was declared. I suspect cfstoredproc's usage of
    statement.setMaxRows() is incorrect. Thats just a guess though.
    Bottom line, I think you'll need handle it manually.
    Personally, I would recommend placing the row count logic in the
    stored procedure (if possible). The overall results will be more
    consistent and you won't have to worry about this kind of issue
    again.
    http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_18339
    http://livedocs.adobe.com/coldfusion/7/htmldocs/00000314.htm
    http://www.remotesynthesis.com/blog/index.cfm/2006/3/23/Maxrows-Issue-in-CFQuery

  • Get selected row from grid

    Hi
    I use JDev 11.1 with ADF, i have grid, i need to get selected row of grid when i press buttom, how can i do that?
    Thanks

    Hi,
    You have a table in your page that is based on a viewObject iterator and you need to get the selected row in your backing bean when you click on a button.
    Did I get this right?
    If so then you need to add an actionListener on this button that executes a method in the backing bean.
    the button code:
    <af:commandButton text="commandButton 1" id="cb1"
                                        actionListener="#{myBean.buttonActionListener}"/>In this method you need to add code like this:
      public void buttonActionListener(ActionEvent actionEvent) {
        BindingContext bindingctx=BindingContext.getCurrent();
        DCBindingContainer bindings=(DCBindingContainer)bindingctx;
        DCIteratorBinding iter= bindings.findIteratorBinding("iteratorName");
        Row currentRow=iter.getCurrentRow();
      }If this is not what you need give some more details.
    Gabriel

  • How to get the rows from a table having some column has any letter

    Hi All,
    suppose i have a table having columns id(number), code(varchar).
    code has alphanumeric characters (ex. ABC123, 67B56 etc).
    some codes are only numbers (2344, 7898 etc).
    how can i get the rows which have alphabets in the code.
    ex:
    id code
    1 AB45
    2 456
    3 890
    4 67B7
    how can i write a query such that it should give me the ids 1 and 4 (as they have alphabets in code)
    thanks in advance to all

    Thanks to one and all.
    i am gettig my required output.
    But i have a doubt in the operator.
    If i add or remove '[]' in the operator, i am getting different ouputs.
    There is a count difference in the result of the operators used.
    REGEXP_LIKE(<column>,'[[:lower:]]')
    REGEXP_LIKE(<column>,'[[[:lower:]]]')
    REGEXP_LIKE(<column>,'[:lower:]')
    Can anybody please explain what is the difference in using '[]', in the operator?
    What is the correct syntax, whether i have to use two '[]'s or one '[]'.
    Also, can i use REGEXP_LIKE() in oracle 8i version.( I am unable to use the operator in 8i)?
    Any query to get the required output in 8i version?
    Thanks in advance to all.

  • How to get multiple rows from database table?

    hello !
    I need to get multiple rows from a OLEDB database table and display them on a table object.
    I did "Wrap in subfrom" on the table,  set  subform of the table to "flowed", and checked "Repeat row for each data item" of Row1 of the table.
    But I can get only one row on the table object.
    I need your help.
    Thanks

    Hi,
    best practices when deleting multiple rows is to do this on the business service, not the view layer for performance reasons. When you selected the rows to delete and press submit, then in a managed bean you access thetable instance (put a reference to a managed bean from the table "binding" property") and call getSeletedRowKeys. In JDeveloper 11g, ADF Faces returns the RowKeySet as a Set of List, where each list conatins the server side row key (e.g. oracle.jbo.Key) if you use ADF BC. Then you create a List (ArrayList) with this keys in it and call a method exposed on the business service (through a method activity in ADF) and pass the list as an argument. On the server side you then access the View Object that holds the data and find the row to delte by the keys in the list
    Example 134 here: http://blogs.oracle.com/smuenchadf/examples/#134 provides you with the code
    Frank

  • Excel - Modify rows without touching other data (have gone thru LV report generation 4 designs)

    File attached....
    Have gone thru FAQs and examples. (And also 4 parts of 'Creating a Report in Microsoft Excel Using the LabVIEW Report Generation Toolkit'. Unfortunately this document is not clear enough for me.)
    Have task of modifying rows of the same excel sheet, number of times without touching data  already present (numbers and strings)
    I have an excel file. (attached)
    A test will be run N number of times.  (N<=17)
    SubTask 1 --> Each time it runs, string data needs to be placed in 'n'th row. (...there are going to be notes in Row 18 and row 19)
    SubTask 2  --> Each time it runs, a 1D array data also will be placed in the same row (but in different cells)
    SubTask 3 --> The number 'n' of the row (where to place the current iteration's data) needs to be determined on fly (by looking at "n-1"st non blank row)
    The same file needs to be used.
    How can above be achieved ?
    thnks
    Sandeep
    Attachments:
    sample excel file.xls ‏14 KB

    See if this board will help.
    http://forums.ni.com/ni/board/message?board.id=BreakPoint&message.id=2391

  • How to get multiple rows at one time in a table?

    hi
    I have a JTable bound with ViewObject and i use multiple selection mode setting to get selection row.
    My question is when i select more then one row at one time i only can get those index from JTable but can't get those rows from ViewObject.is it possible to get rows from ViewObject? or how to use JTable row index to get row from ViewObject?

    repost

  • How do I get Front Row to work with Lion?

    Hello fellow Mac users,
    How do I get Front Row to work with Lion? I have an iMac 27 inch computer and is the sole entertainment provider for my bedroom. I refuse to put a TV in my room and wanted to know how to get Front Row to work again on my mac? It seems that the upgrade to Lion erased the app.
    I have quite a few movies and series that I bought off iTunes and is a shame that I can't use a media center app like Front Row on Lion.

    I kind of have the opposite problem. I need to know how to turn off my remote on the computer. I am using the remote for my Apple TV and it keeps making the volume on my Computer go up and down (with annoying sounds).
    There used to be a way to un-sync the remote with the comp but I cannot remember how and the Apple help is not much help! I have Lion.
    Thanks!
    Best,
    Tony

Maybe you are looking for

  • Strange Error in OBIEE 11g

    Hi Friends, Currently, i was working in mapping feature in obiee 11g. For that i have added <li>Necessary <spatial tags> in instanceconfig.xml file. <li>Created a new datasource in the mapviewer and brought it to the online. <li> After that i went in

  • Edit option missing in ESS Personal profile

    Hi all gurus, In the screenshot i given below, I am unable to add photo or edit bank details. "Save & exit" & "save" button are inactive. How can I make it active. Please help me . You can see save & exit , save, browse, upload all buttons are inacti

  • To fix control parameter for PO creation

    Hi freinds is it possible to control  creation of PO for lower net value based on document type. thanx sanjay

  • Wi-fi problem after update to IOS 7.0.3 on iPhone 4S

    Like many people, Wi-Fi has stopped working on my iPhone after updating to IOS 7.0.3. I can make working Wi-fi after cooling my iPhone few minutes on the refregirator! With IOS 6, there were no problems. What can I do to fix it.

  • Using external editor (PSE12), sometimes photos open on wrong desktop

    Using external editor (PSE12), sometimes photos open on wrong desktop. This is annoying and only happens 10-20% of the time. I then have to drag the photos to the desktop PSE is running in. Unfortunately I cannot find any pattern s to when this will