Change delete link href for each row of table

Hi,
I am using Struts/JSP to do the following..
iterate through a list of bean objects and show them as table rows. I can do this successfully. I'm using logic:iterate tags to iterate and bean:write tags to write to table columns.
I have a delete link added to each row.. which is configured as follows..
<logic:iterate..... >
<tr>
<bean:define  id="rowId" name="form" property="bean"/>
<td><a href="order.do?action=delete&orderid=<%=rowId%>">Delete</a></td>
</tr>
</logic:iterate>I'm trying to investigate if there are other ways to do this instead of using
"<%=rowId%>"...
Any suggestions?
Thanks

Hi,
Check the event "EH_ONONE_CLICK_ACTION " line 58/59 it calls 'Relationships' window's outbound plug 'ToAccountRelationshipsEF'
lr_window = me->view_manager->get_window_controller( ).
   lr_window->call_outbound_plug( 'ToAccountRelationshipsEF' ).
keep breakpoint in the outbound plug, you can see the navigation details it could be done using nblinks/tlinks or by calling the navigation link of parent component bp_head/overview..
Similarly EH_ONNEW event will get trigger when you click on new button and it allows to open the view in editable mode, again this is calling the same outbound plug ToAccountRelationshipsEF'.. looks like there could be dynamic navigation happening with the same outbound plug, please debug and see.
To achieve your requirement you have to change the navigation to edit page instead of display page..please debug see how navigations are implemented.
If by default navigation to relationship view is implemented in editable mode then it could be achieved via creating a read only config and switch between editable configuration and read only config. based on the source..
Hope this helps..
Cheers,
Sumit Mittal

Similar Messages

  • Check Box for each row in report -- all rows deleting when pressing DELETE

    Hello experts! I have set up a report with a check box for each row. When I click the DELETE button to delete the selected rows, every single one of the rows get deleted...even the ones that are not selected. I have my process point set to "On Submit - After computations and validations".
    This is my delete process (SHG is the table and SHG_ID is the primary key):
    FOR i in 1..HTMLDB_APPLICATION.G_F01.count
    LOOP
    DELETE FROM SHG
    WHERE SHG_ID = HTMLDB_APPLICATION.G_F01(i);
    END LOOP;
    Also, I've added to query in the region source this line:
    htmldb_item.checkbox(1, SHG_ID) del,
    Where does the "1" come into this? Not sure what I am doing wrong!
    Message was edited by:
    user477193
    Message was edited by:
    user477193

    The 1 (first argument to all the htmldb_item.* APIs) corresponds to the array number in htmldb_application.g_fNN. So 1 will populate array g_f01, 2 will populate g_f02 and so on.
    Your code seems fine, it should delete only the checked rows. Are you sure there is no other process on the page that might be deleting the rows? See if you can put up an example on htmldb.oracle.com

  • How to add a comment for each row on the output of a report?

    I would like to add a comment (field) for each row on the output of report? This comment should to be saved as well. Is there a way i can do that?
    Regards,
    Ram

    Hi Dimitri,
    through the instead of trigger functionality i am able to update the view. This is view is based on different views which should be linked to a table (as you suggested) in which comments can be stored. Hower this table is empty and how to link this table with the view now? I face the following challenge.
    View consists the following columns, for example
    select name, sex, age from test_view
    name sex age
    John M 20
    Anton M 30
    Willy M 40
    shirley F 38
    sharon F 37
    The report has the following output, for example
    name     sex age
    John     M 20
    Anton     M 30
    Willy M 40
    Shirley F 38
    Sharon F 37
    Now i would like to add comment through a button.
    The report layout looks like
    name sex age
    John M 20 <add comment button>
    After submitting the <add comment button> you can enter text which deals with John
    text='John doesnot like me'
    Finally the report display the comment as well
    name sex age
    John M 20 'John doesnot like me' <update/delete comment button>
    Anton M 30 <add comment button>
    Willy M 40 <add comment button>
    Shirley F 38 <add comment button>
    Sharon F 37 <add comment button>
    After submitting the <update/delete button> you can change or delete the entered text.
    I hope this example clears things up.
    Regards,
    Ram

  • SQL merge and after insert or update on ... for each row fires too often?

    Hello,
    there is a base table, which has a companion history table
    - lets say USER_DATA & USER_DATA_HIST.
    For each update on USER_DATA there has to be recorded the old condition of the USER_DATA record into the USER_DATA_HIST (insert new record)
    - to have the history of changes to USER_DATA.
    The first approach was to do the insert for the row trigger:
    trigger user_data_tr_aiu after insert or update on user_data for each rowBut the performance was bad, because for a bulk update to USER_DATA, there have been individual inserts per records.
    So i tried a trick:
    Instead of doing the real insert into USER_DATA_HIST, i collect the USER_DATA_HIST data into a pl/sql collection first.
    And later i do a bulk insert for the collection in the USER_DATA_HIST table with stmt trigger:
    trigger user_data_tr_ra after insert or update on user_dataBut sometimes i recognize, that the list of entries saved in the pl/sql collection are more than my USER_DATA records being updated.
    (BTW, for the update i use SQL merge, because it's driven by another table.)
    As there is a uniq tracking_id in USER_DATA record, i could identify, that there are duplicates.
    If i sort for the tracking_id and remove duplicate i get exactly the #no of records updated by the SQL merge.
    So how comes, that there are duplicates?
    I can try to make a sample 'sqlplus' program, but it will take some time.
    But maybe somebody knows already about some issues here(?!)
    - many thanks!
    best regards,
    Frank

    Hello
    Not sure really. Although it shouldn't take long to do a test case - it only took me 10 mins....
    SQL>
    SQL> create table USER_DATA
      2  (   id      number,
      3      col1    varchar2(100)
      4  )
      5  /
    Table created.
    SQL>
    SQL> CREATE TABLE USER_DATA_HIST
      2  (   id      number,
      3      col1    varchar2(100),
      4      tmsp    timestamp
      5  )
      6  /
    Table created.
    SQL>
    SQL> CREATE OR REPLACE PACKAGE pkg_audit_user_data
      2  IS
      3
      4      PROCEDURE p_Init;
      5
      6      PROCEDURE p_Log
      7      (   air_UserData        IN user_data%ROWTYPE
      8      );
      9
    10      PROCEDURE p_Write;
    11  END;
    12  /
    Package created.
    SQL> CREATE OR REPLACE PACKAGE BODY pkg_audit_user_data
      2  IS
      3
      4      TYPE tt_UserData        IS TABLE OF user_data_hist%ROWTYPE INDEX BY BINARY_INTEGER;
      5
      6      pt_UserData             tt_UserData;
      7
      8      PROCEDURE p_Init
      9      IS
    10
    11      BEGIN
    12
    13
    14          IF pt_UserData.COUNT > 0 THEN
    15
    16              pt_UserData.DELETE;
    17
    18          END IF;
    19
    20      END;
    21
    22      PROCEDURE p_Log
    23      (   air_UserData        IN user_data%ROWTYPE
    24      )
    25      IS
    26          ln_Idx              BINARY_INTEGER;
    27
    28      BEGIN
    29
    30          ln_Idx := pt_UserData.COUNT + 1;
    31
    32          pt_UserData(ln_Idx).id     := air_UserData.id;
    33          pt_UserData(ln_Idx).col1   := air_UserData.col1;
    34          pt_UserData(ln_Idx).tmsp   := SYSTIMESTAMP;
    35
    36      END;
    37
    38      PROCEDURE p_Write
    39      IS
    40
    41      BEGIN
    42
    43          FORALL li_Idx IN INDICES OF pt_UserData
    44              INSERT
    45              INTO
    46                  user_data_hist
    47              VALUES
    48                  pt_UserData(li_Idx);
    49
    50      END;
    51  END;
    52  /
    Package body created.
    SQL>
    SQL> CREATE OR REPLACE TRIGGER preu_s_user_data BEFORE UPDATE ON user_data
      2  DECLARE
      3
      4  BEGIN
      5
      6      pkg_audit_user_data.p_Init;
      7
      8  END;
      9  /
    Trigger created.
    SQL> CREATE OR REPLACE TRIGGER preu_r_user_data BEFORE UPDATE ON user_data
      2  FOR EACH ROW
      3  DECLARE
      4
      5      lc_Row      user_data%ROWTYPE;
      6
      7  BEGIN
      8
      9      lc_Row.id   := :NEW.id;
    10      lc_Row.col1 := :NEW.col1;
    11
    12      pkg_audit_user_data.p_Log
    13      (   lc_Row
    14      );
    15
    16  END;
    17  /
    Trigger created.
    SQL> CREATE OR REPLACE TRIGGER postu_s_user_data AFTER UPDATE ON user_data
      2  DECLARE
      3
      4  BEGIN
      5
      6      pkg_audit_user_data.p_Write;
      7
      8  END;
      9  /
    Trigger created.
    SQL>
    SQL>
    SQL> insert
      2  into
      3      user_data
      4  select
      5      rownum,
      6      dbms_random.string('u',20)
      7  from
      8      dual
      9  connect by
    10      level <=10
    11  /
    10 rows created.
    SQL> select * from user_data
      2  /
            ID COL1
             1 GVZHKXSSJZHUSLLIDQTO
             2 QVNXLTGJXFUDUHGYKANI
             3 GTVHDCJAXLJFVTFSPFQI
             4 CNVEGOTDLZQJJPVUXWYJ
             5 FPOTZAWKMWHNOJMMIOKP
             6 BZKHAFATQDBUVFBCOSPT
             7 LAQAIDVREFJZWIQFUPMP
             8 DXFICIPCBCFTPAPKDGZF
             9 KKSMMRAQUORRPUBNJFCK
            10 GBLTFZJAOPKFZFCQPGYW
    10 rows selected.
    SQL> select * from user_data_hist
      2  /
    no rows selected
    SQL>
    SQL> MERGE
      2  INTO
      3      user_data a
      4  USING
      5  (   SELECT
      6          rownum + 8 id,
      7          dbms_random.string('u',20) col1
      8      FROM
      9          dual
    10      CONNECT BY
    11          level <= 10
    12  ) b
    13  ON (a.id = b.id)
    14  WHEN MATCHED THEN
    15      UPDATE SET a.col1 = b.col1
    16  WHEN NOT MATCHED THEN
    17      INSERT(a.id,a.col1)
    18      VALUES (b.id,b.col1)
    19  /
    10 rows merged.
    SQL> select * from user_data_hist
      2  /
            ID COL1                 TMSP
             9 XGURXHHZGSUKILYQKBNB 05-AUG-11 10.04.15.577989
            10 HLVUTUIFBAKGMXBDJTSL 05-AUG-11 10.04.15.578090
    SQL> select * from v$version
      2  /
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE    10.2.0.4.0      Production
    TNS for Linux: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - ProductionHTH
    David

  • Changing the linked image for the Image Matte Key doesn't work

    When I change the linked image for the Image Matte Key in Photoshop, the link does not change in my Premiere Pro CS6. Sometimes it takes 2-3 times going into the Image Matte Key setting and locating the new matte in Explorer (each time having to re-locate the folder that the matte is in) to see it within the premier monitor. Any suggestions?

    Hi
    The commands work correctly here on the same OS etc: Cycle Locators jump to the next/prev marker and the Playhead jumps to the Start of the Marker.
    Default KC are Control Command +Arrow Left/right
    Step 1: check you are using the correct key command :-)
    CCT

  • Raise expection for each row if returned set contains x

    Hello Guys,
    I have the following code and almost gave up on the idea to raise an exception and print
    a line for each row where the sales price is < 10. I know how this works with a CURSOR but I want to try it without it. Thinking about it let me to the conclusion that this is not possible to act on individual row results on a set based operation. I will have to use a CURSOR (not set based so I can look at each row).
    Am I thinking correctly?
    (Code example deleted due to confusion)
    Code example deleted due to confusion
    Edited by: metalray on 10.11.2010 01:07

    Hi 3360,
    I am using PL/SQL. I can make my point without any code.
    The question, in a different format is this:
    Can I throw an whatever exception (or dbms_output put line) for individual rows WITHOUT using a cursor.
    My answer (and I just need clarification on this):
    *(1)* No, because anything apart from a cursor is set-based and set-based operations (select, join, union)
    can not through exceptions on individual rows.
    *(2)* Yes, you can have a DBMS_OUTPUT.PUT_LINE with whatever exception on a set based operation
    for each individual row that causes the exception (I dont think this answer is true :)
    @Agustin UN, thanks for that. I know that is possible :) The problem is,
    that I dont think I can print or fetch each individual row that causes the "exception" since
    it is treated as a set. - I am welcome for someone to tell me that it work nevertheless

  • Updating A Table in a for each row trigger

    I have a trigger,
    create or replace trigger ins_ibpm_temp_trig
    after update of ethic_dt on ethics_approval_info for each row
    My issue is that I need to update the ethics_approval_info for each record based on the ethics date that was updated. I am getting the error
    ORA-04091: table ORACLETEST.ETHICS_APPROVAL_INFO is mutating, trigger/function may not see it.
    So the issue here of course is that I am trying to update a table, that is already in the middle of updating. Is there any way to get around this?

    Try these links
    Link1
    Link2
    Regards,
    Abdetu..

  • Update button in sql report for each row can only get the report value

    I have to added Update for each row of records like:
    select a.*,'Update' button from (
    select c.*,d.login from country c,champ d
    where c.champ_id=d.champ_id(+)
    order by c.name) a
    then go to the report->edit button ->Column Link
    I added some items P40_REGION, P40_CHAMPID,P40_ACTIVE,P40_CODE and assign the value like #region#,#active# ,#code# to these item, but when I click the update button in the report I found the values such as #region#,#active# ,#code# is the report value not the select list selected value(the region, active column are displayed as select list lov).
    Can anyone tell me how to sort this knid of problem?
    Thanks a lot!

    Sorry, it doesn't work. I also tried apex_application.g_f01(i), but not everytime I can get the value or get the incorrect value. If you have time you can try to create it like what I have described. Our team use two days now but still can not sort this problem.

  • Update primary key with a tabular form based on a select list for each row

    Hello!
    I've two tables: Table1 with only one column (primary key) is a foreign key for table2.column1 (primary key). There is also a second primary key column in table2.
    Now I want to change the primary key values in table2.column1 with a tabular form (MRU) based on a select list (LOV based on table1.column1) for each row.
    The user should be able to choose for every row a new value from the select list to change the old primary key value at this position.
    How can I do this with ApEx?
    I've the tabular form and so on, but at the moment I get the following error:
    "Error in mru internal routine: ORA-20001: Fehler in MRU: row= 1, ORA-20001: ORA-20001: Die aktuelle Version der Daten in der Datenbank wurde geändert, seit der Benutzer einen Update-Prozess eingeleitet hat. ..."
    Thank you for your support!
    Kay

    Hello!
    I've two tables: Table1 with only one column (primary key) is a foreign key for table2.column1 (primary key). There is also a second primary key column in table2.
    Now I want to change the primary key values in table2.column1 with a tabular form (MRU) based on a select list (LOV based on table1.column1) for each row.
    The user should be able to choose for every row a new value from the select list to change the old primary key value at this position.
    How can I do this with ApEx?
    I've the tabular form and so on, but at the moment I get the following error:
    "Error in mru internal routine: ORA-20001: Fehler in MRU: row= 1, ORA-20001: ORA-20001: Die aktuelle Version der Daten in der Datenbank wurde geändert, seit der Benutzer einen Update-Prozess eingeleitet hat. ..."
    Thank you for your support!
    Kay

  • Prompting user for input for each row in the report

    Is it possible to have a user entered field for each row in a report ?
    ie. have a report with empolyee number, employee name, title, salary, and comment. Select of of these columns from the SQL query except for the comment, and then when the report is generated have the user be prompted for what the want the comment to be for every employee in the report?

    That is, have the user generating the report enter in a different comment for EACH employee. (ie Joe Smith's comment is "good worker and John Smith's comment is "come to work late on Tuesdays and Thursdays", Sally Jones' comment is "Expert in C++" etc.) as the reports is being built for each row returned from the query.

  • How to process a block for each row in an internal table....

    Hi experts....
    In po approval workflow the scenario is like this.... for each po there may be more than one approver. approvers list i am maintaining in the ztable. list of approvers(no of approvers) is decided by the po value. I have collected these approvers into internal table. now i have to process a block ( approving or rejecting the po... )in the workflow for each row in the internal table.
    how can i do this. based on the decision of the 1st approver  approves the po then it should go to next approver in the internal table...otherwise end the workflow.....
    Please help me......

    i have created an internal table in the workflow container in which i am getting the list of approvers....
    how can i loop the internal table in the workflow...?
    how can i know the index of the loop in the workflow.....(will sy-index work here....? so that i can use loop until step in the main workflow to call the subworkflow..so that if sy-index is greater than no of entires in the itab then i can come out of the loop)

  • Get the Count for each row

    I'm trying to get the count for each row to total count for each month
    Something like this
    Hardware     |      Jan
    Monitors       |       5
    Processors   |      137
    Printers        |      57
    etc........
    How can I write a query for this. I can get the Hardware column but don't know how to get the next column.

    If you can provide more data like sample input DML statements it would have been wonderful..
    Assuming is , you need a pivot. Here is an article on basic Pivot..
    http://sqlsaga.com/sql-server/how-to-use-pivot-to-transform-rows-into-columns-in-sql-server/
    something like this may be..
    DECLARE @Input TABLE
    Hardware VARCHAR(20),
    [Date] VARCHAR(20)
    INSERT INTO @Input VALUES('Monitor', '01/01/2014'), ('CPU', '01/01/2014'), ('Monitor', '01/03/2014')
    , ('ABC', '01/01/2014'),('Monitor', '02/01/2014')
    ;WITH CTE AS
    SELECT Hardware, LEFT(DATENAME(M, [Date]),3) AS [MonthName] FROM @Input
    SELECT *
    FROM
    SELECT Hardware, [MonthName], COUNT(Hardware) AS Count FROM CTE GROUP BY Hardware, [MonthName]) a
    PIVOT (MAX([Count]) FOR [MonthName] IN ([Jan], [Feb])) pvt
    Please mark as answer, if this has helped you solve the issue.
    Good Luck :) .. visit www.sqlsaga.com for more t-sql code snippets and BI related how to articles.

  • For each row of a table call a pl/sql function

    Hi,
    i have a search form in adf like this:
    parameter1:___
    parameter2:____
    buttonSearch
    Table with results
    field1 field2 field3
    row1 ------ --------- -------
    row2 ------ --------- -------
    row3 ------ --------- -------
    The user inputs the parameters 1 and 2 then press buttonSearch and the query execute and returns rows 1 to 3.
    What i need is for each row call pl/sql function and passed the parameter 1 and 2 and field 1 to 3 (plsql function recives 5 parameters (parameter1, parameter2, field1 , field2 and field3) )
    my buttonSearch call a java class that execute ExecuteWithParamters method.
    I create the call to my plsql function on Application module class and then export as a java interface.
    So i have the function to use in the viewcontroller layer, but i don't know where to use it, and how to pass the paramters: the parameter 1 and 2 that user inputs and the row fields.....
    any ideas....
    thanks!!

    Hi,
    for this you need to call the PLSQL function upon table rendering, which means that you need a field in the table referencing a managed bean. In the managed bean you can use #{row} and resolve it using a ValueExpression. #{row} gives you access to the current rendered row (this is why you need to do it when the table renders) and thus allows you to call getAttribute(name) to get the values of field 1 - 3. The search field value you should get through the bindings reference (assuming the search form uses ADF). Then you create an operation binding for the executeWithParameters and call operationBindingName.getParamsMap().put(argname, argvalue); on it.
    Frank
    Ps.: I am concerned about the performance you get and wonder if it isn't possible to create a transient attribute that executes the function and displays the results. As I understand, the search parameters are only to filter the result set, which you still can do

  • Make select for each row - another solution?

    For example I have a function with day before selection:
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    function ABS return boolean is
    ret number(10,2);
    begin
    for sab in (select saldod from ndv_ccli, nd_clientes where
    (:p_dtvenc-dtdoc) = (select min(:p_dtvenc-dtdoc) from ndv_ccli, nd_clientes
    where (:p_dtvenc-dtdoc>0)and
    ndv_ccli.cod_cli = cod_cli) and
    ndv_ccli.cod_cli = cod_cli order by dtdoc desc,cddb )
    loop
         ret := sab.saldod;
    end loop;
    return (ret);
    end;
    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    In report I use the value of this function(a) in another function(b) to sum with few values.
    Output of function(b) has a lot of rows and for each row it makes select in function(a) to find the value, but actualy it is the same. Is it possible to do this select only one time and then put in function(b) only it's value? Because it makes report too slow...
    tnx before

    Thanx, but while compiling it says:
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    REP-0749: After form trigger cannot reference a report column.
    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

  • Different values in a list box for each row of the table control...

    Dear Experts,
    Is it possible to populate different values for each row in a listbox inside a table control ?
    Example,
    Row 1 in the the table contains A, B & C
    Row 2 in the same table contains C, D & E
    If yes, How?
    yes i am using
      call function 'VRM_SET_VALUES'
        exporting
          id     = i_name
          values = i_list.
    Thank you .
    Message was edited by:
            Kokwei Wong
    Message was edited by:
            Kokwei Wong

    Hi Wong,
    this is code example for listbox
    TYPE-POOLS vrm .
    DATA: lt_vrm_values TYPE TABLE OF vrm_value.
    DATA: wa_vrm_values TYPE vrm_value.
    PARAMETER p_list AS LISTBOX VISIBLE LENGTH 10.
    INITIALIZATION.
      wa_vrm_values-key = 'Key1'.
      wa_vrm_values-text = 'Value1'.
      APPEND wa_vrm_values TO lt_vrm_values.
      wa_vrm_values-key = 'Key2'.
      wa_vrm_values-text = 'Value2'.
      APPEND wa_vrm_values TO lt_vrm_values.
      wa_vrm_values-key = 'Key3'.
      wa_vrm_values-text = 'Value3'.
      APPEND wa_vrm_values TO lt_vrm_values.
    AT SELECTION-SCREEN OUTPUT.
      CALL FUNCTION 'VRM_SET_VALUES'
           EXPORTING
                id              = 'P_LIST'
                values          = lt_vrm_values
           EXCEPTIONS
                id_illegal_name = 1
                OTHERS          = 2.
      IF sy-subrc  0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    To fill it with data from DB, just do select in INITIALIZATION and put that values with same alghoritmus.
    Manas M.
    P.S.: This is very easy question, you should use search ...

Maybe you are looking for