Setting current row of a view based on row selected from another view.

Hi,
We have two Views V1 and V2. Both views are based on the same tables except that V1 is based on multiple tables. In our application we are showing a read only table which is based on V1. The user can select a particular record for edit. But the edit page is based on V2 and as a result the first record always shows up for editing even though the user may have selected another record.
Is there a way we can pass the primary key of the record selected from V1 to V2 and set that record as the current record.
We have tried setCurrentRowWithKey, but this did not help.
Regards
RHY

Hello,
post the PK as an URL parameter within the link you open the edit page. Then read this parameter in your page (the page with this link) action class and send it to an ActionBinding:
JUCtrlActionBinding action = (JUCtrlActionBinding) bc.findCtrlBinding("nameOfBinding");
ArrayList arrayList= new ArrayList();
arrayList.add(0,primaryKey);
action.setParams(arrayList);
action.doIt();
In your AppModule create a method nameOfBinding with primaryKey as in parameter
public void nameOfBinding (Number primaryKey )
getV2().setWhereClause("PRIMARY_KEY=:0");
getV2().setWhereClauseParam(0,primaryKey );
getV2().executeQuery();
In the AppModule you have to publish this method in "ClientInterface".
Create an Action binding for this method in your list jsp.
Hope this helps
Britta

Similar Messages

  • Firing a view based on a selection from a popup window

    Hi,
    I have a main window in which there is "Display Details" button and a view container to hold a view. On clicking this display button I'm showing a pop-up window which will show the user the options to select a particular view. After the selection and clicking on OK in the pop up window the corresponding view should be shown the view container.
    I tried this by firing an outboung plug to the corresponding view based on the selection in the popup window. The problem is I cannot create a navigation link in the window as the popup view is not part of the main window.
    Could you please provide me your insights on how to handle this scenario?
    Regards,
    Vivek

    Hi Vivek,
    Please refer this article: [Creating Navigations and Embedding Views at Runtime - Web Dynpro ABAP|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/50f3660d-ad29-2b10-2482-8120e56942dd?QuickLink=index&overridelayout=true]. Also refer [Thomas' reply in this thread|Embed a view dynamically in a ViewContainerUIElement;.
    Regards

  • Is there a way to fill a cell with a value based on the selection from another cell?

    For example: If have a drop down menu created for Cell A1 with options (Dog 1, Cat 2, Bird 3). Is there a way to fill cell A2 automatically when I select from the drop down menu.
    So if I selected 'Cat' in A1, cell A2 would automatically input the 2.

    I suggest an extensible method that allows you to add other animals:
    This method adds a small table called "Animal Lookup" that matches names (same as in the pop-up menu) with a value.
    The table on the left uses this table to retrieve the value based on the animal:
    B2=VLOOKUP(A2, Animal Lookup :: A:B, 2, 0)
    select B2 and fill down

  • How to update one lov based on value selected from another lov.

    Hi ,
    I have a form in which I created the 2 LOVs for my event_date field and event_name field each which is stored in one table.
    t I want to update the event_date LOV everytime event_name is selected.
    How can I achieve this.
    Thanks.
    Neeti.

    Hi,
    You can do this using dynamic LOVs. Here are the steps for populating a employee LOV on selecting a department.
    1) Create a dynamic lov say emloyee_lov with a bind variable like this
    select empno,ename from scott.emp
    where deptno = :dept
    2) Create a form on scott.emp.
    3) In the empno field which should be a LOV type of field, associate it with
    the above employee LOV.
    4) Then set the binding(s) for the bind variable(s) defined in the lov by
    selecting the deptno column.
    This would help.
    Thanks,
    Sharmila

  • ORA-00903 when selecting from a view

    Hi,
    I'm migrating our existing database on 8.1.7 to 9.2 and I keep getting an ORA-00903 error (on Oracle 9.2.0.1.0) when I try to select from a view with nested selects. Here's a very simple example - no rows are returned when I issue the query (its a dummy query, but it illustrates the problem). However, as soon as I turn it into a view, and do a select from the view, I get an Invalid Table Name error. Can anyone suggest why this is happening?
    So... This works on its own
    SELECT ID
    FROM (
    SELECT /*+ ORDERED */
    t.id
    FROM tblmsg t,
    tblevent e,
    e_workflowstate s,
    (SELECT e_taskstatus_id
    FROM e_taskstatus s,
    e_workflowplntasks ws
    WHERE s.e_taskstatus_id = ws.taskid
    UNION ALL
    SELECT e_taskstatus_id
    FROM e_taskstatus s,
    e_workflowmantasks ws
    WHERE s.e_taskstatus_id = ws.taskid
    UNION ALL
    SELECT e_taskstatus_id
    FROM e_taskstatus s,
    e_workflowtrgtasks ws
    WHERE s.e_taskstatus_id = ws.taskid) V
    WHERE t.id = e.id
    AND t.id = v.e_taskstatus_id
    AND V.e_taskstatus_id = e.id)
    But this doesn't
    CREATE OR REPLACE VIEW TESTVIEW AS
    SELECT ID
    FROM (
    SELECT /*+ ORDERED */
    t.id
    FROM tblmsg t,
    tblevent e,
    e_workflowstate s,
    (SELECT e_taskstatus_id
    FROM e_taskstatus s,
    e_workflowplntasks ws
    WHERE s.e_taskstatus_id = ws.taskid
    UNION ALL
    SELECT e_taskstatus_id
    FROM e_taskstatus s,
    e_workflowmantasks ws
    WHERE s.e_taskstatus_id = ws.taskid
    UNION ALL
    SELECT e_taskstatus_id
    FROM e_taskstatus s,
    e_workflowtrgtasks ws
    WHERE s.e_taskstatus_id = ws.taskid) V
    WHERE t.id = e.id
    AND t.id = v.e_taskstatus_id
    AND V.e_taskstatus_id = e.id);
    View created
    SELECT * FROM TESTVIEW;
    ERROR at line 1:
    ORA-00903: invalid table name
    This works fine on 8.1.7. I haven't tested it on 9.1 though.
    Any ideas?
    Thanks

    One thing to try would be to use SCHEMA.TABLENAME rather than just TABLENAME to refer to the tables.
    Its just a shot in the dark, but hopefully it may help.
    Martin.

  • How can i update rows  in a table based on a match from a select query

    Hello
    How can i update rows in a table based on a match from a select query fron two other tables with a update using sqlplus ?
    Thanks Glenn
    table1
    attribute1 varchar2 (10)
    attribute2 varchar2 (10)
    processed varchar2 (10)
    table2
    attribute1 varchar2 (10)
    table3
    attribute2 varchar2 (10)
    An example:
    set table1.processed = "Y"
    where (table1.attribute1 = table2.attribute1)
    and (table1.attribute2 = table3.attribute2)

    Hi,
    Etbin wrote:
    Hi, Frank
    taking nulls into account, what if some attributes are null ;) then the query should look like
    NOT TESTED !
    update table1 t1
    set processed = 'Y'
    where exists(select null
    from table2
    where lnnvl(attribute1 != t1.attribute1)
    and exists(select null
    from table3
    where lnnvl(attribute2 != t1.attribute2)
    and processed != 'Y'Regards
    EtbinYes, you could do that. OP specifically requested something else:
    wgdoig wrote:
    set table1.processed = "Y"
    where (table1.attribute1 = table2.attribute1)
    and (table1.attribute2 = table3.attribute2)This WHERE clause won't be TRUE if any of the 4 attribute columns are NULL. It's debatable about what should be done when those columns are NULL.
    But there is no argument about what needs to be done when processed is NULL.
    OP didn't specifically say that the UPDATEshould or shouldn't be done on rows where processed was already 'Y'. You (quite rightly) introduced a condition that would prevent redo from being generated and triggers from firing unnecessarily; I'm just saying that we have to be careful that the same condition doesn't keep the row from being UPDATEd when it is necessary.

  • How to populate a table based on a row selection from another table.

    Hi, i just started to use ADF BC and Faces. Could some one help me or point me a solution on the following scenario .
    By using a search component , a table is being displayed as a search result. If i select any row in the resulted table , i need to populate an another table at the bottom of the same page from another view. These two tables are related by primary key . May i know how to populate a table based on a row selection from another table. Thanks
    ganesh

    I understand your requirement and the tutorial doesn't talk about Association between the views so that you can create a Master-Detail or in DB parlance, a Parent-Child relationship.
    I will assume that we are dealing with two entities here: Department and Employees where a particular Department has many Employees and hence a Parent-Child relationship.
    Firstly, you need to create an Association between the two Entities - Department and Employees. You can do that by right clicking on the model's entity and then associating the two entities with the appropriate key say, DepartmentId.
    Once you have done that, you need to link the two entities in the View section with this Association that you created. Then go to AppModule and make sure that in the Available View Objects: 'EmployeesView' appears under 'DepartmentView' as "EmployeesView via <link you created>". Shuttle the 'DepartmentView' to the right, Data Model and then shuttle
    "EmployeesView via <link you created>" to the right, Data Model under 'DepartmentView'.
    This will then be reflected in your Data Controls. After that, you simply would have to drag this View into your page as a Master-Detail form...and then when you run this page, any row selected in the Master table, would display the data in the Detail table.
    Also, refer to this link: [Master-Detail|http://baigsorcl.blogspot.com/2010/03/creating-master-detail-form-in-adf.html]
    Hope this helps.

  • Trying to get a fourth field to populate based on the selection from three other dropdown menus.

    I would like the Treatment Classification field to populate with a combination of text and numbers based on my selection from three other drop down menus.
    For example:
    If I select "0-No Hurt" in the AHL field, "0-No Hurt in the PHL field, and "Near Miss in the Treatment Choice field, then the Treatment Classification field would populate to "L00NM".
    If I select "2-Moderate Hurt: in the AHL, "4-Fatality" in the PHL field, and "Restricted Work Incident" in the Treatment Choice field, then the Treatment Classifiaction field would populate to "L24RWI".
    If I select "1-Minor Hurt" in the AHL field, "4-Fatality" in the PHL field, and "Medical Treatment Incident" in the Treqatment Choice field, then the Treatment Classifiaction field would populate to "L14MTI".
    Etc, etc, etc.
    I could then fill in the resyt of the script with the required text.
    Not sure how to load my PDF file.
    Thanks,
    Rick

    Do your dropdown list items currently have export values set up? It seems like the value you want to construct is simply concatenating the values of the three dropdowns, and this would be easy if you set the export values of the list items appropriately. For example, the export value for the "0-No Hurt" item would be 0 and for "Near Miss" it would be "NM", etc., so the script could look something like:
    // Get the values of the drop downs, as strings
    var v1 = getField("AHL").valueAsString;
    var v2 = getField("PHL").valueAsString;
    var v3 = getField("Treatment Choices").valueAsString;
    // Set this field's value
    event.value = "L" + v1 + v2 + v3 + "other text goes here."

  • Refresh/Reprocess view from another view.

    Hi all,
    I'm facing a problem with reprocessing a view in webgui:
    In component BT126H_CALL i've created a new assignment block ZREGDETAILS based on a Z-table which contains products.
    Also in component BT126H_CALL i've enhanced a view SCDETAILS and added a total-field (ztotal) that should show the total value of the records in ZREGDETAILS.
    My problem is now that view SCDETAILS is processed before ZREGDETAILS, so I cannot update the ztotal field... How can I call the SCDETAILS to be reprocessed again from the ZREGDETAILS view?
    In other projects I used folowing code for calling the save event on ZREGDETAILS from another view. But in this case the SCDETAILS is not a subcontroller of ZREGDETAILS.
      DATA: sub_contr TYPE REF TO CL_BSP_WD_VIEW_CONTROLLER,
            contr_regdetails TYPE REF TO ZL_ZBT126H__REGDETAILS_IMPL.
      sub_contr = ME->GET_SUBCONTROLLER_BY_VIEWNAME('ZBT126H_CALL/ZRegdetails').
      IF sub_contr is bound.
        contr_regdetails ?= sub_contr.
        contr_regdetails->Save( ).
      ENDIF.
    Many thanks in advance!
    Siegfried

    Hi Pooja,
    According to my understanding on action of radio buttons i hope you are calling some other component so on action of the radio  button may be it might be any of the radio button u can set the radio buttons as it was initially and then call the screen ...
    Setting the radio buttons should be done in the action of radio buttons... By doing this i hope that radio buttons will be set and second view also will be calleed when we go back to the screen we can view the radio buttons refreshed.. Try this hope it might be helpful...
    Regards,
    Sana.

  • OBIEE Report - filter based on the result from another analysis

    Hi,
    I am using OBIEE 11g,
    I am trying to use a filter which is based on the result from another analysis. I have an analysis A which is as table 1, and I want to filter the respective columns of analysis B (Table B) based on analysis A to remove the duplicates for march 01, 02, and 07 , but it is not working properly. I took a max of start and end time when I created analysis A. Please let me know if I did anything wrong. thanks.
    Table 1
    Employee Number
    Date
    IN
    Out
    Start Time
    End Time
    xxxxxxx
    2015-02-26
    9:00
    13:00
    00:00:00
    00:00:00
    2015-02-27
    12:00
    18:00
    00:00:00
    00:00:00
    2015-02-28
    8:00
    14:00
    00:00:00
    00:00:00
    2015-03-01
    14:00
    20:00
    14:00:00
    20:00:00
    2015-03-02
    16:00
    20:00
    16:00:00
    20:00:00
    2015-03-07
    14:06
    20:02
    14:00:00
    20:00:00
    2015-03-11
    16:00
    20:00
    16:00:00
    20:00:00
    2015-03-14
    8:00
    14:00
    00:00:00
    00:00:00
    2015-03-25
    14:00
    20:00
    16:00:00
    20:00:00
    Table 2
    Employee Number
    Date
    IN
    Out
    Start Time
    End Time
    Hours
    xxxxxxx
    2015-02-26
    9:00
    13:00
    00:00:00
    00:00:00
    -3
    2015-02-27
    12:00
    18:00
    00:00:00
    00:00:00
    6
    2015-02-28
    8:00
    14:00
    00:00:00
    00:00:00
    6
    2015-03-01
    14:00
    20:00
    00:00:00
    00:00:00
    6
    14:00:00
    20:00:00
    6
    2015-03-02
    16:00
    20:00
    00:00:00
    00:00:00
    4
    16:00:00
    20:00:00
    4
    2015-03-07
    14:06
    20:02
    00:00:00
    00:00:00
    6
    14:00:00
    20:00:00
    6
    2015-03-11
    16:00
    20:00
    16:00:00
    20:00:00
    4
    2015-03-14
    8:00
    14:00
    00:00:00
    00:00:00
    6
    2015-03-25
    14:00
    20:00
    16:00:00
    20:00:00
    4

    Why avg here?
    What columns you want to show in the report?
    for a employee for given date if he have 2 rows then you may sum up hours right?
    Employee Number
    Date
    IN
    Out
    Start Time
    End Time
    Hours

  • Call method with an argument from another view controller

    I have a UIViewController MainViewController that brings up a modal view that is of the class AddPlayerViewController. When the user clicks 'Save' in the modal view I need to pass the Player data (which is a Player class) from the modal view to the MainViewController in addition to triggering a method in the MainViewController. What's the best way to accomplish this? I'm new to cocoa and have only tried using delegates and some ugly hacks to no avail.
    Thanks for the help.

    If I understand correctly, you have:
    1. A model object, Player.
    2. A top view controller, MainViewController.
    3. Another view controller, AddPlayerViewController, which MainViewController displays modally.
    I'm guessing that AddPlayerViewController creates a new Player object and lets the user set its values, and you need a way to get that new Player into MainViewController once they're done.
    So, here's what I'd do:
    1. Create an AddPlayerViewControllerDelegate protocol. It should declare two methods, "- (void)addPlayerViewController:(AddPlayerViewContrller*)controller didAddPlayer:(Player*)newPlayer" and "- (void)addPlayerViewControllerNotAddingPlayer:(AddPlayerViewController*)controll er".
    2. Add an attribute of type "id <AddPlayerViewControllerDelegate>" called delegate to AddPlayerViewController. Also add a property with "@property (assign)" and "@synthesize".
    3. Modify AddPlayerViewController so that if you click the "Save" button, addPlayerViewController:didAddPlayer: gets called, passing "self" and the new Player object as the two arguments. Also arrange for clicking the "Cancel" button to call addPlayerViewControllerNotAddingPlayer:.
    4. Modify MainViewController to declare that it conforms to AddPlayerViewControllerDelegate. Implement those two methods (addPlayerViewControllerNotAddingPlayer: might be an empty method if you don't want to do anything).
    5. When you create your AddPlayerViewController, set its delegate to your MainViewController.
    If you need more detail, let me know what parts you need me to elaborate on.

  • Opening a view from another view of the same window in diff Browser.

    Hi Experts,
    My requirement is to open a view (say view 2) from another view (say view 1) with click of a button in a different browser, both the views are embedded into the same window, and also i have to pass some data from view1 to view2, based no the input data, i am displaying some information. Also both views belog to the same component.
    Some pointers on this would be of great help.
    Regards,
    Ashish.

    You would need to open another window.
    See if_wd_window and if_wd_window_manager.
    Call the GET_API to get a handle to window manager.
    The new window can show V2.
    The original Window with 2 views,
    must fire plug to navigate v2 to empty view to hide it from Window1.
    The to Views talk to one another via WDC Controller.
    View 2 calls WDC controller methods.  The WDC controller the fires Event.
    View 1 can listen to this event with a method of type event handler.
    View 1 can for example react to button on View 2 and close WINDOW 2.
    Good luck
    Phil.

  • Performance problem with select from _DIFF view

    Hi,
    we have a versioned table with more then one million records. We use the DBMS_WM.SetDiffVersions procedure and select from DIFF view to get data differences between two workspaces. The problem is that the select from the DIFF view is very slow. I takes more than 15 minutes. Has anybody an idea why it consumes so much time? Is there any way how to improve it?
    Thanks and regards
    Ondrej

    Hi,
    This can be due to any number of things, but is typically caused by an inefficient optimizer plan. Make sure that statistics on the _LT table have been recently analyzed.
    Also the following information would be useful:
    1. What is the relationship of the workspaces that you are trying to compare (parent/child, children of the same parent, etc) ?
    2. How many and of what type dml are being performed in the workspaces ?
    3. What version of Workspace Manager are you using and what is the version of the database ?
    4. What is the time needed to select from the _DIFF view based on the primary key ?
    Regards,
    Ben

  • Selecting from a view when tables are in more than one schema problem

    I give up where am I missing it. Why is the ORA-01031 error being generated on the view u1.bv1. In testing even if I give object access to u3 I still get the same errors:
    SQL>
    SQL> drop user u1 cascade;
    drop user u1 cascade
    ERROR at line 1:
    ORA-01918: user 'U1' does not exist
    SQL> drop user u2 cascade;
    drop user u2 cascade
    ERROR at line 1:
    ORA-01918: user 'U2' does not exist
    SQL> drop user u3 cascade;
    drop user u3 cascade
    ERROR at line 1:
    ORA-01918: user 'U3' does not exist
    SQL> drop role aRole;
    drop role aRole
    ERROR at line 1:
    ORA-01919: role 'AROLE' does not exist
    SQL>
    SQL>
    SQL> select user from dual;
    USER
    SYS
    1 row selected.
    SQL>
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
    PL/SQL Release 10.2.0.1.0 - Production
    CORE     10.2.0.1.0     Production
    TNS for Solaris: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    5 rows selected.
    SQL>
    SQL> create user u1 identified by u1 default tablespace users
    2 quota unlimited on users;
    User created.
    SQL>
    SQL> create user u2 identified by u2 default tablespace users
    2 quota unlimited on users;
    User created.
    SQL>
    SQL> create role aRole;
    Role created.
    SQL>
    SQL> create user u3 identified by u3 default tablespace users;
    User created.
    SQL>
    SQL> grant aRole to u3;
    Grant succeeded.
    SQL>
    SQL> alter user u3 default role all;
    User altered.
    SQL>
    SQL> grant create session to u3;
    Grant succeeded.
    SQL>
    SQL> create table u1.t1(c1 number);
    Table created.
    SQL>
    SQL> create table u2.t1(c1 number);
    Table created.
    SQL>
    SQL> grant select on u2.t1 to u1;
    Grant succeeded.
    SQL>
    SQL> create or replace view u1.bv1 as
    2 select u1.t1.c1 as c1 ,u2.t1.c1 as c2
    3 from u1.t1, u2.t1 where u1.t1.c1 = u2.t1.c1;
    View created.
    SQL>
    SQL> grant select on u1.bv1 to aRole;
    Grant succeeded.
    SQL>
    SQL> create or replace view u1.gv1 as select * from u1.t1;
    View created.
    SQL>
    SQL> grant select on u1.gv1 to aRole;
    Grant succeeded.
    SQL>
    SQL> connect u3/u3
    Connected.
    SQL>
    SQL> select * from u1.bv1;
    select * from u1.bv1
    ERROR at line 1:
    ORA-01031: insufficient privileges
    SQL>
    SQL> select * from u1.gv1;
    no rows selected
    SQL>
    SQL> spool off

    User u1 cannot do a grant on a view to other user if the view uses tables from other schemas unless you do a "with grant option" grant.
    You need to do the following to make it work:
    SQL> grant select on u2.t1 to u1 with grant option;
    Grant succeeded.
    SQL>

  • Hi, i am trying to open and view a report that comes from another server with different odbc connection

    hi, i am trying to open and view a report that comes from another server with different odbc connection
    i created a crystal report for a mysql database on my machine and everything works great
    but we have other reports that come from other machines with different odbc connection
    and this its not working when opens the report asks for credentials
    and i cannot use the remote ip for these reports that come from other machine
    question
    if i cannot connect to remote ip to open the report
    for each report i have to create a database the report database on my machine and then open the report ?
    or there is some other way to open the report ?
    i am using visual studio 2013 and mysql and
       <add key="MYSQLODBCDRIVER" value="{MySQL ODBC 5.3 UNICODE Driver}"/>
    thanks

    short
    i have a report that it was created on another server with a specific dsn
    now i am trying to open the report on my machine
    the database from the other server does not exist on my machine
    the server machine where the report was created the ip its not accessible
    question ?
    can i open the report on my machine or its impossible ?
    thanks

Maybe you are looking for

  • Flashing yellow light?

    I've been reading other posts regarding the problems encountered by some after upgrading the Apple TV to 2.2. I believe my problem is related, but not sure. Others have found relieve by holding the "menu" and "-" keys on the remote to regain control,

  • If I order a iPod Touch 5 online, can it be engraved with the purchase

    I want to get a iPod Touch 5th Generation and I was sondering if it could be engraved with the purchase so I don't have to go to someone else

  • Passing sylesheet name as a parameter to xsql file

    The way that I can have <page xmlns:xsql="urn:oracle-xsql" connection="{@conn}"> where conn is the connection! Could I have someting like <?xml-stylesheet type="text/xsl" href="{@style}" > where style would be the style sheet that the user chooses in

  • Insert master data from SEM to BW

    Hi There, I wonder if anyone know, how in a standard way if it is possibile to insert master data from SEM to BW. I am referring in particular to the masterdata of the 0VENDOR. In fact the customer want to input the 0VENDOR Master data directly from

  • Is image editing easier on more recent versions?

    I run a small website and am trying to decide if I should purchase this software for editing, or if I can get by with an older copy as easy, or something else free online? Is there any advantage of this over a 3-4 year old copy? Will images look bett