Edit a single row in af:table

I am using af:table. In the af:columns I am using a h.Inputtext. Also I have placed one Edit af:command link in starting of every row. At first all the input fields are not editable.( ie I have set the readonly property to true). After click the Edit link all the columns in the particular row should be editable. I tried it so many times but couln't get any solution. Is anybody know the solution for this problem. I want it urgently.
Thanks
Satheesh

One solution I can think of is to use the detail disclosure feature of the ADF Faces table.
Your table will be a read only table and into the detailDisclosure area you drag an input form.
Now when someone clicks the show link he'll be able to edit the row.

Similar Messages

  • ADF: How to get the attributes' values of one single row from a table?

    Currently I have a table with 3 attributes, suppose A,B and C respectively. And I've added an selectionListener to this table. That means when I select one single row of this table, I wish to get the respective value of A, B and C for that particular row. How do I achieve this?
    suppose the method is like:
    public void selectionRow(SelectionEvent se) {            //se is the mouse selection event
    .......??? //what should I do to get the values of A\B\C for one single row?
    Edited by: user12635428 on Mar 23, 2010 1:40 AM

    Hi
    Assuming you are using Jdev 11g.
    Try with this
    public void selectionRow(SelectionEvent se) {
    String val = getManagedBeanValue("bindings.AttributeName.inputValue");
    public static Object getManagedBeanValue(String beanName) {
    StringBuffer buff = new StringBuffer("#{");
    buff.append(beanName);
    buff.append("}");
    return resolveExpression(buff.toString());
    public static Object resolveExpression(String expression) {
    FacesContext facesContext = getFacesContext();
    Application app = facesContext.getApplication();
    ExpressionFactory elFactory = app.getExpressionFactory();
    ELContext elContext = facesContext.getELContext();
    ValueExpression valueExp =
    elFactory.createValueExpression(elContext, expression,
    Object.class);
    return valueExp.getValue(elContext);
    Vikram

  • Multiple pages that edit a single row

    I have searched on tabs and editing a single row using multiple pages and I am confused. I don't want to use java as I am trying to not learn that too...
    What I am trying to do sounds like it has been explained before but let me do this again...
    I have a record that is too large to fit on a single screen. This makes for a cumbersome entry process. The record is actually broken into four "logical" chunks. Main, Sub1, Sub2 and Sub3.
    I have made a list that will allow the record to be selected and call the first logical page... L1.
    I have made tabs that show all the pages and allow me to navigate between them quickly.
    When I get to L1 all the data is there. I may not change any data on that page and go directly to L2 through L4. However the record is not brought forward onto those pages. So the pages are not related (and I don't have the terminology right I know :) and I could "link" the pages. So here is what I would like the application to do;
    1. Display a list and allow the user to select the record to edit.
    2. Upon edit go to the first page (tab).. this works
    3. Allow the user to select a tab and the page displays the data for the record selected
    4. Allow the user to complete the edits and save the record. Upon save the user is returned to the list in step 1.
    I was thinking there are several ways to do it... but I was hoping someone could save me a bunch of trial and error (emphasis on the error) ...
    1. When navigating off the page save the record, pass the key and re-read the record... ugly huh?
    2. Pass all the session data for the record over to the next screen. Is that possible? e.g pxx_field1 = pyy_field1
    The the question was does a template with two level tabs keep the record data between tabs?
    Any help is greatly appreciated.
    Sam

    I think this works... kinda
    1. I have a "list" that allows the selection of the item to edit.
    2. That list opens a page that is the "header" page for a tab set.
    3. Each page in the tab set uses the same "ID" to read the record and display the columns. That is how it would work if the list called each individual page.
    4. I modified the "slave" tabs to have the "ID" of the "header" page.
    This displays the correct data on each page. And it looks like the "apply changes" button saves the changes on the page.
    Caveats inlclude (I think as I haven't done exhaustive testing"
    1. "apply changes" must be done at each page where there were changes or they would be lost.
    2. The first dispaly of the page is blank. Clicking on the tab a second time displays the data. This is true if it is the first time a user selects a record in a session (the "slave" tabs are blank) or if it is a subsequent record update (the "slave" tabs have the last records data.
    Thoughts... is this really boring to everyone but me?
    Sam

  • Two radio buttons in a single row of a table

    Hi All,
    Can we have two radio buttons in a single row of ADF TABLE.
    My requirement is that i have a list of submitted records. The user can approve or reject the records.
    All the records are displayed in the table. there will be two columns in the table(Approve , Reject) The user can approve the first record and reject the second record and so on....
    using table selectOne we can select only one row. Using radio buttons how to select the multiple records, at the same time grouping is done between the two columns(radio buttons) in the table

    Hi,
    I don't think that you can do this with radio buttons. The usecase is more for chackboxes. It would have been a usecase for radio buttons if there was a single column with 3 possible options
    - pending
    - approved
    - rejected
    Frank

  • Adobe form from webdynpro : Getting a single row in the table

    Hello,
    I have a scenario in which I have to create a adobeform from webdynpro application.
    I have created the form and have the context designed in place.
    I am facing a problem in the table I have in my adobeform.
    I am adding rows to this table dynamically using a button using "addInstance"
    Now on the webdynpro side , when I try to read this table I get a single row from this table.
    This row is always the first row of that table.
    I checked the following things from blog   /people/juergen.hauser2/blog/2006/09/12/avoiding-common-mistakes-when-using-tables-on-sap-interactive-forms  , i.e. :
    Cardinality of the node.
    Tick on the option "Repeat Row for Each Data Item".
    But still no success.
    With deadlines to catch I had to post this question after trying a lot.Please help.

    Hello Otto,
    I had found this link before and used the same solution , but unfortunately is taking a long time.
    Now what I am doing is :
    1. I append 10 rows into the table then bind it to the node
    2. Then on the adobe form I have removed the check on "Add row for each line item" because of which it shows only 1 row 
         on the form.
         Now I add rows dynamically, but this puts a limit on the number of rows can be added to the table i.e. 10.
    But this again has added problems like while displaying the form or modifying I hav to handle it seperately and cannot use the same form as it is.( as I have removed the tick for "Add row for each line item" ).
    Thanks,
    Omkar Mirvankar

  • Display and edit currently selected row of ADF Table in ADF Form

    I have an ADF Read-only Table and ADF Form, which were created from the same Data Control.
    I need to be able to edit the selected row of the table in the form (just like in "Binding Data Controls to your JSF page" part of "Developing RIA Web Applications with Oracle ADF" Tutorial). However, I can't figure out how to do this :(
    I found the following solution on the Web: #{bindings.DeptView1.currentRow.dataProvider.dname} - but it doesn't work, since "the class oracle.jbo.server.ViewRowImpl does not have the property dataProvider".
    Sorry for the newbie question.
    Thanks in advance for any help!

    Hi,
    AFAIK, dataProvider is not supported on ADF BC, hence the error.
    If you have created ADF Read only table and form from the same data control you just need to refresh the form based on table selection to show up the selected record, to do which you just need to add partialTriggers property to the panelFormLayout and set its value to the id of table
    Sireesha

  • Refreshing only the single row of  ADF Table

    Hi All,
    I have a webcenter application where the ADF Applications has been deployed.Now the Data is coming onto the ADF Tables from a webservice.In that particular table i need to refresh only the single row(whichever selected by the user to edit ) or even a particular field with the updated values as well as need to validate and to create a message box saying about the errors if the validation goes wrong.
    Please suggest!!

    Hi,
    if "updated value" mean that the value got changed on the middle tier (not the browser client) then the update requires the table to be partially refreshed. If the user edits a row and in this row has dependent fields, then this can be achieved by partially refreshing the column. Note that ADF Faces tables don't refresh just one cell
    Frank

  • How to edit a particular row in the table ctrl when a push button is clickd

    Hi Experts,
    How to edit a particular row (except the Primary keys) after selecting it in the TABLE CONTROL when a
    push button is clicked in the table control.
    For Eg. If you have a push button say "Modify", the particular row what we select in the table control should be in a
    editable mode after clicking "Modify" Push button.
    Please help me out.
    Thanks in advance.

    Hey Ram,
    Thanks a ton.
    Its working fine...sorry for the late reply.
    The reason behind the delay is because i had modified my code as per your logic it worked fine but the thing is that the whole column was in editable mode but not a single row.
    For E.g  If i want to edit a particular row, first i select the row and then  click on "Modify" button. After i click on the button, the whole column gets in a editable mode including the one which i intentionally selected.
    Here, the solution is that you have to set a flag in PBO so that once it is done with PBO then it need not come back again after we click on "Modify" button.
    And one more query is that after you modify a particular row in the table control ( When it is in editable mode) and click on the "Save" button, it is not getting updated to database.
    To update the database, we need to select the row once again after modifying it and click on the "Save" button.
    Here, database is updating only when it is selected again. If it is not selected, it is not getting updated.
    If you have any alternative solution, then please help me out.( I hope i am clear with the question.)
    Thanks,
    Ananth.

  • How to update a single row of data table

    How we can update a single row of the data table by clicking the button in the same row.
    Thanks in Advance.

    Hi!
    What do You mean 'update'? Get fresh data from DB or change data and commit it in DB?
    If commit, try to read here:
    http://developers.sun.com/jscreator/learning/tutorials/2/inserts_updates_deletes.html
    Thanks,
    Roman.

  • Editing a particular row in a table - Web Dynpro Abap

    Hi all,
    My scenario is, I have to fetch contract details from EKPO table when I enter the Purchase Document Number and press SUBMIT button on my interactive form. The details will be displayed in a table.
        This part is working fine.
    Then, out of the displayed rows in that table, I have to click one of the rows. This particular row should appear as a separate row below the existing table. Here I will edit certain fields and update the database.
    My question is, How to display that particular row below the existing table which I select. The table will dynamically increase the row size depending on the records.

    Hi Surya,
    You can use the index property to display the selected row data.
    Suppose your form structure is like:
    BodyPage
       TBL_EKPO
           DATA
               EBELN
               EBELP
               LOEKZ
        SF_SELECTED_ROW_DISPLAY
            EBELN
            EBELP
            LOEKZ
    Then, in any of the field's exit event you can write:
    BodyPage.SF_SELECTED_ROW_DISPLAY. EBELN.rawValue = xfa.resolveNode( " BodyPage.TBL_EKPO.DATA["+ this.parent.index +"].EBELN").rawValue;
    Hope this helps.
    Amit

  • Delimited String To A Single Row Within A Table

    I'll try to make a simple example of what I am trying to accomplish...
    Let's say that I have a table (Blah) which has the following Fields:
    User, DateTime, Q1, Q2.... all the way to Q50.  The Questions are radios with a value of 1,0, or null.
    Since I didn't want to manually make 50 different items for the Radio questions, I am creating them from Javascript within a Region Source; as well as giving them id's and names.  This worked fine.
    When I hit a submit button, I have Javascript create a delimited string for the questions, which I pass to a Shared Item.  (1,0,1,1,null,0,etc...)  I then have the Javascript run a Shared Procedure for the Insert into my Table.
    Here is where I am stuck.  I am confused on how to merge the delimited string into my Insert statement, from PL/SQL.
    Here is a dummied down sample of what I am trying to write.  (Shared Item is :ITEM_ARRAY, with a delimiter of ~:~ )
    DECLARE
        array APEX_APPLICATION_GLOBAL.VC_ARR2
    BEGIN
        array := APEX_UTIL.STRING_TO_TABLE(:ITEM_ARRAY, ':~:' );
        INSERT INTO tbl_blah (
            :APP_USER
            ,SYSDATE
             FOR z IN 1..array.count LOOP
                 array(z);
             END LOOP;
    END;
    Every which way I tried, I always get Not Enough Values Error.
    I tried to make everything in a delimited string as well:
    Insert Into tbl_blah (SELECT * FROM array)
    Can someone please enlighten me on the correct way to do this.  All of the examples I have seen are to write to multiple rows, via the loop.  I want to just have 1 record, horizontally.
    Thanks !!!

    Hi,
    Why can't you insert a row into table with first two columns and do update for that row???
    Just for simple work around, I have created a table with below columns,
    USER_NAME VARCHAR2 
    EXAM_DATE DATE
    M1 NUMBER
    M2 NUMBER
    M3 NUMBER
    M4 NUMBER
    M5 NUMBER
    M6 NUMBER
    M7 NUMBER
    M8 NUMBER
    M9 NUMBER
    M10 NUMBER
    I wrote a below code to insert a row into that table,
    declare
    v_arr APEX_APPLICATION_GLOBAL.VC_ARR2;
    v_stmt varchar2(1000);
    begin
    v_arr:= APEX_UTIL.STRING_TO_TABLE(:p_all_items,'~');
    insert into test_group(user_name,exam_date) values (:APP_USER,sysdate);
    dbms_output.put_line('row inserted');
    FOR i IN 1..v_arr.COUNT LOOP
    dbms_output.put_line('i='||i||' value='||v_arr(i));
    if v_arr(i) is null then
    v_stmt:='update test_group set m'||i||'=NULL';
    else
    v_stmt:='update test_group set m'||i||'='||v_arr(i);
    end if;
    dbms_output.put_line(v_stmt);
    execute immediate v_stmt;
    END loop;
    end;
    I just ran this block in 'SQL Commands', It worked for me. but i inserted only one row, so it updates a single row, In case of multiple row need to use the unique column for update. change the above code as per your requirement.
    I hope this work around will help you. If not can you please create an example in apex.oracle.com and share login credentials.
    Thanks
    Lakshmi

  • Outputting Results in a single row from a Table

    Afternoon folks,
    I have a scenario in hand and I was hoping to get some pointers. I could write a PL/SQL program and all would be fine. I was hoping if there was a way to do it in SQL and not have to create a whole new sub-program for this. I already have a PL/SQL program that populates a table. I want to use that data now and output it in a certain manner.
    Any help is greatly appreciated and this is not something I need to solve by tonight. :)
    Script to create table and insert records into it:
    drop table FLIGHT_ROUTES;
      CREATE TABLE FLIGHT_ROUTES
       (FLIGHT_NO           VARCHAR2(7),
        ROUTE_ID            NUMBER,
        DAY_OF_OPERATION    NUMBER,
        ORIGIN              VARCHAR2(3),
        DESTINATION         VARCHAR2(3),
        STOPVER             VARCHAR2(3),
        ROUTE_TYPE          VARCHAR2(1)
    REM INSERTING into FLIGHT_ROUTES
    Insert into FLIGHT_ROUTES (FLIGHT_NO,ROUTE_ID,DAY_OF_OPERATION,ORIGIN,DESTINATION,STOPVER,ROUTE_TYPE) values ('UX-1001',1,1,'SFO','LAX',null,'D');
    Insert into FLIGHT_ROUTES (FLIGHT_NO,ROUTE_ID,DAY_OF_OPERATION,ORIGIN,DESTINATION,STOPVER,ROUTE_TYPE) values ('UX-1001',1,2,'SFO','LAX',null,'R');  -- Record 2
    Insert into FLIGHT_ROUTES (FLIGHT_NO,ROUTE_ID,DAY_OF_OPERATION,ORIGIN,DESTINATION,STOPVER,ROUTE_TYPE) values ('UX-2001',2,1,'SFO','JFK',null,'D');
    Insert into FLIGHT_ROUTES (FLIGHT_NO,ROUTE_ID,DAY_OF_OPERATION,ORIGIN,DESTINATION,STOPVER,ROUTE_TYPE) values ('UX-2001',2,2,'SFO','JFK','ORD','D');
    Insert into FLIGHT_ROUTES (FLIGHT_NO,ROUTE_ID,DAY_OF_OPERATION,ORIGIN,DESTINATION,STOPVER,ROUTE_TYPE) values ('UX-2001',2,3,'SFO','JFK','DEN','R');  -- Record 5
    Insert into FLIGHT_ROUTES (FLIGHT_NO,ROUTE_ID,DAY_OF_OPERATION,ORIGIN,DESTINATION,STOPVER,ROUTE_TYPE) values ('UX-3001',3,1,'LAX','JFK','YYZ','D');
    Insert into FLIGHT_ROUTES (FLIGHT_NO,ROUTE_ID,DAY_OF_OPERATION,ORIGIN,DESTINATION,STOPVER,ROUTE_TYPE) values ('UX-3001',3,2,'LAX','JFK','YYC','D');
    Insert into FLIGHT_ROUTES (FLIGHT_NO,ROUTE_ID,DAY_OF_OPERATION,ORIGIN,DESTINATION,STOPVER,ROUTE_TYPE) values ('UX-3001',3,3,'LAX','JFK','YUL','D');What I would like to do is output the results by Flight Number, Origin1, Destination1, Origin2, Destination 2 and Origin 3, Destination 3. The maxium number combinations per Flight is 3. The other condition is that the listing should only show the Origin and Destinations and Stopover if it's a Day time Flight. If its a Red Eye, then don't show that option. So, Record 2 would be completely omitted here as it's a Red Eye flight and Record 5 would be omitted for Origin/Destination/Stopover 3 for flight UX-2001.
    Flight_No       Origin1     Destination1    Stopover 1      Origin2          Destination2      Stopver2      Origin3    Destination3     Stopover3
    ============================================================================================================================================================
    UX-1001         SFO         LAX
    UX-2001         SFO         JFK                             SFO              JFK               ORD
    UX-3001         LAX         JFK             YYZ             LAX              JFK               YYC           LAX        JFK              YULEdited by: Roxyrollers on Sep 9, 2011 3:59 PM
    Edited by: Roxyrollers on Sep 9, 2011 3:59 PM
    Edited by: Roxyrollers on Sep 9, 2011 4:00 PM

    Hi,
    Assuming that day_of_operation is what determines whether a row is 1, 2 or 3:
    WITH     got_r_num     AS
         SELECT     f.*
         ,     ROW_NUMBER () OVER ( PARTITION BY  flight_no
                                   ORDER BY          day_of_operation
                           ) AS r_num
         FROM    flight_routes        f
         WHERE     route_type     != 'R'
    SELECT       flight_no                              || ',' ||
           MAX (CASE WHEN r_num = 1 THEN origin      END)     || ',' ||     -- Origin 1
           MAX (CASE WHEN r_num = 1 THEN destination END)     || ',' ||     -- Destination 1
           MAX (CASE WHEN r_num = 1 THEN stopver     END)     || ',' ||     -- Stopover 1
           MAX (CASE WHEN r_num = 2 THEN origin      END)     || ',' ||     -- Origin 2
           MAX (CASE WHEN r_num = 2 THEN destination END)     || ',' ||     -- Destination 2
           MAX (CASE WHEN r_num = 2 THEN stopver     END)     || ',' ||     -- Stopover 2
           MAX (CASE WHEN r_num = 3 THEN origin      END)     || ',' ||     -- Origin 3
           MAX (CASE WHEN r_num = 3 THEN destination END)     || ',' ||     -- Destination 3
           MAX (CASE WHEN r_num = 3 THEN stopver     END)  AS csv_text            -- Stopover 3
    FROM       got_r_num
    GROUP BY  flight_no
    ORDER BY  flight_no
    ;Output:
    CSV_TEXT
    UX-1001,SFO,LAX,,,,,,,
    UX-2001,SFO,JFK,,SFO,JFK,ORD,,,
    UX-3001,LAX,JFK,YYZ,LAX,JFK,YYC,LAX,JFK,YULThis does not assume that origin1 is always on the same row with day_of_operation=1. Origin1 will be from the row with the lowest day_of_operation, not counting red-eyes. Likewise, origin2 will be from the row with the 2nd lowest day_of_operation, whether that value is 2 or not.
    If your data is such that the row with day_of_operation=n will necessarily be the nth lowest one, not counting red-eyes, then you don't need the sub-query got_r_num; just use your real table (with the condition WHERE route_type != 'R'), and use day_of_operation where I used r_num. (This is what Solomon's solution, which I just saw, does.)
    Edited by: Frank Kulash on Sep 9, 2011 4:47 PM
    Edited by: Frank Kulash on Sep 9, 2011 4:53 PM

  • JAVA code for fetching a single row from a table in SAP

    Hi All
    Can anybody please tell me how to implement the "Select Single" query in JAVA while accessing SAP
    Our requirement is to fetch the Sales Document number(VBELN) by passing the Purchase Order Number(BSTKD) from any of the tables containing these two fields like VBKD.
    Thanks in Advance
    Sree Ramya

    Hi Vijay/Rich/Ravi
        I am already using this FM RFC_READ_TABLE.  In this FM, we have a parameter called <b>DATA</b> in <b>TABLES</b> list.  The length of the record of this table DATA is 512 charaters, whereas the length of the record of the table <b>VBKD</b>(the table which i am trying to fetch) is 586 characters.  As a result of which, an exception is being thrown stating that "The record does not fit into the table <b>DATA</b>".
    Plz clarify this.
    Thanks,
    Sree Ramya.

  • Can we delete a single row in SID table?

    I am having a problem with conversion exit in SID table. 
    These are the error messages.
    Value in SID table is TPV; correct value is TPV; SID in SID table is 875
    Message no. RSRV200
    Diagnosis
    The following data record either has an incorrect internal format or the characteristic value that is in the correct format appears as a corrected value of another incorrect value:
    ·     Characteristic value: TPV
    ·     SID: 875
    ·     Correct characteristic value: (see below) TPV
    ·     SID after correction: 875
    Value in SID table is TPV 2008; correct value is TPV; SID in SID table is 2887
    Message no. RSRV200
    Diagnosis
    The following data record either has an incorrect internal format or the characteristic value that is in the correct format appears as a corrected value of another incorrect value:
    ·     Characteristic value: TPV 2008
    ·     SID: 2887
    ·     Correct characteristic value: (see below) TPV
    ·     SID after correction: 875
    Now the row with SID 875 is causing the problem. Is it possible that I can delete only this row in the SID table.
    Thanks for your help
    Subra

    Hi.....
    Procedure :
    RSA1>>>InfoObjects >>Right Click on InfoObject >>delete Master Data >> u can see the option of deleting SIDs............
    Otherwise........u can delete value from a SID table......u can use tcode SE14...........to delete the entries.........
    Check this......
    deleting contents of SID table.
    But still I will suggest u not to delete SID...........it may lead to inconsistency of data.........
    Try to repair SId using the program : RSDMD_CHECKPRG_ALL or RSRV...........
    Regards,
    Debjani......

  • Trying to insert a single row in a table based on NOT EXIST

    Hi,
    I have a procedure where i am doing an insert into the table say
    create table ABC(PK number, valu varchar2(10));
    insert into ABC values(1,'hi');
    Now my problem is that this procedure may be run several times so if a PK already exists, it should not try to insert again. so I came up with the solution..
    insert into ABC select (1,'hi') from ABC where not exists (select 1 from ABC where PK=1);
    but the problem with this is that if Pk=1 does not exist and if the table already has 5 rows, 5 insertions of PK=1 are being done..
    can anyone plz help me.
    thanks

    Why dont you let Oracle handle the uniqueness of the records and you make your code robust to handle that exception?
    DUP_VAL_ON_INDEX exception can be caught in your procedure and no action needs to be taken on that in this case.

Maybe you are looking for

  • How do I turn on in-app purchases if it is greyed out? I am using an iPad Air with ios7

    I am trying to use my iTunes voucher to buy a in-app purchase but when I go to the setting it won't work. It is greyed out and I therefore cannot get the in-app purchase. Please help.

  • HP Officejet 5740 Scan Noise

    My brand-new HP Officejet 5740 (which has the latest firmware) seems rather grumbly/rumbly when it scans.  It's not very smooth-sounding.  Copying, however, has a less loud grumbly/rumbly sound.  5740 owners/users/HP employees: I know sound is subjec

  • Finding enqueue dequeue rate

    Hi, How to find enqueue and dequeue rate in Oracle Advanced Queue? Please post if there is any SQL query to find enqueue per second, dequeue per second. Regards, Guru

  • Printing to my epson R1800 with Lightroom2.4 and to Photoshop CS4

    I use to be able to print from my lightroom 2 to my epson R1800, with all my ICC profiles, but after I upgraded to Lightroom2.4 and to Photoshop CS4 I can't seem to print from that app. Anyone have a clue.. I've spoken to tech support for hours on en

  • Bad export to JPG

    I am having a problem exporting my RAW files to JPG format in LightRoom 2.4. The colors are off, seem to be red shifted and darker, as if exposure seems to be about 2 stops under, and detail is lost. I'm running WIndows Vista Ultimate Service Pack 1.