Undo Changes in child table (using view link)

Hello,
My environment : Jdev 11.1.2.2.0
I have a master-detail relationship which is linked using View Link. My requirement is to open a popup on double clicking the master row, and the user can add/delete/modify the child rows. Also I need to provide Ok/Cancel buttons. I need to Undo all the changes done for the child when the user clicks 'Cancel'. Can anyone please help to solve this?
Regards
Suresh

First u need to a custom SelectionListener and make sure that RowSelection is set to single row. Add a method in the Managed Bean and make the row as current using the below java code
public void Master_tableListener(SelectionEvent selectionEvent) {
// This code is to make the selected row as current programatically
ADFUtil.invokeEL("#{bindings.*YourViewObjectName*.collectionModel.makeCurrent}",
new Class[] { SelectionEvent.class },
new Object[] { selectionEvent });
Row selectedRow =
(Row)ADFUtil.evaluateEL("#{bindings.*YourViewObjectIterator*.currentRow}");
// Tip : U will get the above EL's when u 1st drop the Master table on the page
// Invoke the pop up programatically
RichPopup.PopupHints ph = new RichPopup.PopupHints();
p1.show(ph);
After writing this code.. All u need to do is Drop the Detail Table on the Dialog of ur popup. This way u will get all the rows of the table. So, filter this table with the foreign key using some code..
Or u can just drop the region containing the Detail Table with the Rollback and commit
- Saif
Edited by: Saif Khan on Sep 11, 2012 5:34 PM

Similar Messages

  • Master/Details Relationship using View Links is not not population data

    Hi,
    I have problem in generating proper data in master/detail relationship using view links passing three parameters between two custom tables can guide me the steps and process how i will able to generate and acheive this requirement.
    very urgent
    Please suggest me

    Without further details, I'd suggest reviewing the following Section of the Fusion Developers Guide:
    http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/web_masterdetail.htm#ADFFD758
    I've done this many times without issue.

  • Can I use View Link in ADF Creation Forms Jdev 10.1.3

    Hi...
    I created a view link of two tables. Then I created a ADF form with Master Object to show some informations.. and I created a ADF Creation form with the detail Object
    I'm trying to submit the informations added in the Detail forms.
    but no records are created in Database..
    Can I submit a creation form using detail object?
    Thanks

    I figured out "partially" the problem, I tried to overrid the create method, and for any reason the commit operation wasn´t working.
    I was trying to set a value for a proprety, but it did not work as a wish.
    My intention was.... when an user execute the form. one specific field brings a value.. however I cannot set default value. cause it´ll change sometimes.
    it´s something like this
    protected void create(AttributeList attributeList) {     
    super.create(attributeList);
    setMyProperty(new Number(0));
    do you know how can I figure out this problem?

  • Advance Table in advance table via view link

    Hi All,
    I have implemented advance table in advance table to show details region data by creating View Link between master and child View Object.
    I have followed all the steps mention in following link
    http://oracleanil.blogspot.com/2010/06/advanced-table-in-advanced-table-via.html
    Now when I am using child VO in details table region it is giving me null pointer exception.
    Please Help.
    Regards,SHD

    Any Clue?

  • Af:tree Using View Links

    Hi
    I have created two af:tree components. Based on similar conditions but on different database tables.
    I have no issues in displaying one tree. I am able to expand the tree and go to second level and so on.
    But for my second tree component when i try to expand the top most level, I am not seeing any values.
    I have enabled debug logs in my JDev to see the query that gets run and found out that the bind variable is getting a junk value.
    The bind variable should typically get the id of the value that i am trying to expand. I am able to see values correctly being passed in my earlier tree (the one that is working fine).
    I have tried to compare both the VOs and View links and could not find any.
    Please help me in resolving this issue.
    Thanks
    Kamal

    Hi Frank
    Sorry for not being clear.
    Let me explain my issue clearly.
    I have a table with columns and values as below:
    LEVEL_ID | FILTER | CODE1 | CODE2
    1     | | A     | B
    2     | A | A1 | A2
    2     | B | B1 | B2
    I want the above table to be shown as below tree structure
    A
    |__A1
    |__A2
    B
    |__B1
    |__B2
    For this implementation, i created a View object that returns all the codes at level_id 1 (VO1) and a View Object that returns all the codes at level_id 2(VO2).
    I have a view link between these two where i bind the CODE1 of VO1 to FILTER of VO2. VO1 is the parent and VO2 is the child.
    Using VO1 i have created the tree (drag and drop) and in the edit tree binding dialog box i have added the rules appropriately.
    When i run my page, with debug logs enabled, I can see the A,B values coming properly in the UI. But, when i try to expand any of them, I do not see the A1,A2 or B1,B2 values.
    In the debug logs, I can see a junk value being passed when i try to expand rather than 'A' or 'B'.
    I have done a similar implementation with another tree component and it works fine as i can see proper values in the debug logs.
    I do not understand why the junk values are passed.
    Hope this explanation gives a clear idea about my issue.
    I am currently using JDev 11.1.1.3 version.
    Thank you
    Kamal

  • Logical error in creating tables using db link in solaris

    Hi,
    While creating table using the syntax create table newtab...as select * from tab@dblink .. I am facing a problem. The newtab table created is having a structure different (from datalength point of view of varchar2 and char datatypes) from the source. The data length is getting tripled i.e. if a column a is varchar2(20) in tab then it is becoming --- a varchar2(60) in newtab. This is happening in solaris environment when the two databases are in 2 different servers. Please let me know if there are any patches to resolve the problem.
    Thanks
    Arnab

    ORA-02019: connection description for remote database not foundHave you used this database link successfully for some other queries?
    The error posted seems to indicate that the DB Link is not functional at all. Has it worked for any other type of DML operation or is this the first time you ever tried to use the link?

  • Problem with af:table and view links

    I want to display a table with data from a database table called PERSON, so I'm using af:table tag.
    The PERSON table has the next fields:
    PERSON_CODE
    PERSON_NAME
    PERSON_COD_STATE
    The field PERSON_STATE is a foreign key to other table called PERSON_STATE:
    PERSON_COD_STATE
    DESCRIPTION
    I've created a view to get data from PERSON table (personView). Because I want to show the person state description in the af:table , I've created another view to get data from PERSON_STATE table (personStateView). And I've also created a view link between personView and personStateView.
    In the column of the af:table that represents the person state I drop the field 'description' of the state view linked to the person view.
    When I run the JSP the state is not shown properly. All the persons are shown with the same state.
    When testing directly with the application module, the view link works properly.
    Does view links work inside a af:table?
    I'm working with ADF 10g.
    Thanks

    Thanks for your reply.
    The second alternative works, but I would be interested in the first one (using a view link).
    The foreign key is defined properly:
    PERSON.PERSON_CODE is a primary key.
    PERSON.PERSON_COD_STATE is a foreign key.
    PERSON_STATE.PERSON_COD_STATE is a primary key.
    I have created a view link based on that foreign key.
    When usign af:table to show the records of PERSON table, all the data of PersonView is properly shown. But the STATE of the person is not ok. It seems as the view link is not working.
    Why?
    Thanks

  • BC4J tag - add new record only in child table using join query

    Hi,
    I have developed the struts base jsp for BC4J component application using jdeveloper wizard.
    i have first developed the BC4J component. using emp table and dept table,
    also developed the association between emp and dept , and create view object using created association.
    when i haae developed the the struts base jsp for BC4J applicaion using alerady created view object. it creates automatically DataEditComponent.jsp and DataTableComponent.jsp and etc...
    and when i want to add new row or record it automatically add the entry in both table ,
    in above scenario i have used dept as master and emp as child table.
    what is the solution , if i want to add row or record in only emp table.
    please help me

    Hi Reetesh,
    I have written following code into the ADD ROW button
    System.out.println("Coming in Click Event");
    OAApplicationModuleImpl am = (OAApplicationModuleImpl) pageContext.getApplicationModule(webBean);
    OAWebBean innerTablebean = (OAWebBean)webBean.findChildRecursive("region12");
    OATableBean innerTable = (OATableBean)webBean.findChildRecursive("innerTablebean");
    OAInnerDataObjectEnumerator enum = new OAInnerDataObjectEnumerator(pageContext,innerTablebean);
    while(enum.hasMoreElements())
    RowSet innerRowSet = (RowSet) enum.nextElement();
    Row []rowsInRange = innerRowSet.getAllRowsInRange();
    OARow newRow = (OARow) innerRowSet.createRow();
    OADBTransaction dbt = am.getOADBTransaction();
    Number b = dbt.getSequenceValue("PK_XX_BATCH_PROGRAM_PARAMETERS");
    newRow.setAttribute("ProgramId", b);
    newRow.setAttribute("ProgramParmId",b);
    newRow.setAttribute("ParameterName",new String(""));
    newRow.setAttribute("ParameterDataType",new String(""));
    newRow.setAttribute("ParameterInOutType",new String(""));
    innerRowSet.insertRow(newRow);
    Now the problem occurs only when there are more than one rows in parent table... As many rows are there in parent table that many times the rows are being added.
    With Regards,
    Sandip

  • Join two table using two link field

    hi all
    i need to left join two table, and to link two table need to match two field
    ex: the link field is store_name and id
    i use below sql statement
    SELECT A1.store_name, A1.id, A1.card, A2.sale, A2.history
    FROM Georgraphy A1, Store_Information A2
    WHERE A1.store_name = A2.store_name(+)
    AND A1.id = A2.id(+)
    but it's wrong
    please tell me how to left join A1 and A2, thx!

    Whats your aim?
    Any error message?
    SQL> select * from geography;
            ID STORE_NAME
             1 a
             1 b
             2 a
             2 b
    SQL> select * from store_information;
            ID STORE_NAME
             1 a
             3 d
    SQL> SELECT *
      2  FROM Geography A1, Store_Information A2
      3  WHERE A1.store_name = A2.store_name(+)
      4  AND A1.id = A2.id(+);
            ID STORE_NAME         ID STORE_NAME
             1 a                   1 a
             2 a
             2 b
             1 b                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Create Materialized View  based on another database table using db link?

    SQL> SELECT sysdate
    2 FROM dual@CBRLINK ;
    SYSDATE
    21-NOV-12
    SQL> CREATE MATERIALIZED VIEW USERCBR.V_T24_COUNTRY1
    2 REFRESH COMPLETE
    3 START WITH SYSDATE NEXT SYSDATE + (5/24)
    4 AS
    5 SELECT sysdate
    6 FROM dual@CBRLINK ;
    CREATE MATERIALIZED VIEW USERCBR.V_T24_COUNTRY1
    ERROR at line 1:
    ORA-04052: error occurred when looking up remote object SYS.DUAL@CBRLINK
    ORA-00600: internal error code, arguments: [ORA-00600: internal error code,
    arguments: [qksfroFXTStatsLoc() - unknown KQFOPT type!], [0], [], [], [], [],
    ORA-02063: preceding line from CBRLINK

    It works for me:orcl>
    orcl> CREATE MATERIALIZED VIEW scott.V_T24_COUNTRY1
      2  REFRESH COMPLETE
      3  START WITH SYSDATE NEXT SYSDATE + (5/24)
      4  AS
      5  SELECT sysdate
      6  FROM dual@l1 ;
    Materialized view created.
    orcl> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE    11.2.0.3.0      Production
    TNS for 32-bit Windows: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    orcl>so there is no problem with the code. HTH.

  • Undo changes in adf table row

    I have a table surrounded by a panel collection. In panel collection i have a button for action "createInsert" of view object to add new rows in table. I have created a method in ViewRowImpl with following signature:
    public void undoChanges(){
    refresh(REFRESH_UNDO_CHANGES | REFRESH_FORGET_NEW_ROWS);
    Now i have button in first column of each row in a table for "undochanges". I have done "partialsubmit" true for this button and in partial trigger of table i have given the reference id of this button. Now everything works fine as expected but there is one problem. When i add new row and in row there are some fields required. Now in that row without entering any data, i presses "undo" button, it gives error that some values are missing so in order to avoid this error, i set "immediate" property of button "true". Now it is working fine but ripple effect of this is that when i changes some existing rows and presses "undo" button, table refreshes but does not show old values. I have printed values in above method for changed attribute and i found that in fact values are changing but not reflecting on table inspite of refreshing. What's the reason for it?

    Try putting the partialTriggers on the individual components inside the table columns instead. Having a partialTrigger on the table itself generated by a components inside the table - your button, could cause recursive partialTriggers or "+partialTrigger confusion+"
    Nick

  • Query to find out tables using view

    Hi
    I have a views using three tables.Now i wanted a query to find out number of views using three tables
    I have written a query
    select * from dba_views where text like '%SELECT%;
    It is giving me error as ora error EXPECTED NUMBER GOT LONG.
    Appreciate your help?

    SELECT DECODE(referenced_type, 'NON-EXISTENT', '.....',
    referenced_type) || ' ' || referenced_owner ||
    '.' || referenced_name r_name, ' is referenced by: ' ||
    type || ' ' || owner || '.' || name name,
    ' Referenced Link: ' || DECODE(referenced_link_name,
    NULL, 'none', referenced_link_name) r_link
    FROM dba_dependencies
    -- WHERE owner NOT IN ('SYS', 'SYSTEM')
    -- and rownum < 50
    ORDER BY 1,2;
    add your own where clause to it

  • Error while trying to access table using DB Link

    Hi All,
    I had to access a table in another instance using a DB link. As there was no DB link, I was asked to create one and then access the table.
    The below query was used to create DB link on my current instance FDEV:
    CREATE PUBLIC DATABASE LINK to_link CONNECT TO apps IDENTIFIED BY appsdev USING 'ABCD';
    The DB link gets created successfully and when I query select * from all_db_links on my current instance FDEV, I see the DB link name.
    However, when I try to access the table, select * from x_stg@to_link on my current instance FDEV, this is resulting in an error as shown below:
    ORA-01017: invalid username/password; logon denied
    ORA-02063: preceding line from TO_LINK
    The TNS entry looks something like this:
    ABCD =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = abc.xx.com)(PORT = 1234))
    (ADDRESS = (PROTOCOL = TCP)(HOST = abc.xyz.com)(PORT = 1234))
    (CONNECT_DATA =
    (SID = ABCD)
    Can someone help me in this regard?
    Thanks in Advance!!
    Regards,
    AB

    You are trying to get 2 databases connected... so, you need to insure that FDEV can find and connect to ABCD.
    So, from your FDEV database server, you can do 2 things (from command prompt):
    1* tnsping ABCD (this will validate that the entry exists in your tnsnames.ora on your FDEV server, and that a valid listener can be found on remote server)
    when above command succeeds:
    2* sqlplus apps/appsdev@ABCD;
    when you have established the connection, then you are SURE that your can connect ABCD database from FDEV database server. It will also validate the username / password combination, create session privilige, account not locked, etc.....
    Please check the above, and post here the results.
    HTH,
    Thierry

  • How to change the Portal Password using a link from Web dynpro application

    Hello Everybody,
    I have a requirement to change the user password from a web dynpro application which is available on a mobile device. Firstly User will log into the portal through a mobile device and after getting authenticated user will be redirected to the mobile application. Within this mobile application there will be a link to change the login password(Portal login). Can somebody tell me how can i change the portal login password from a link available within the mobile application. Looking forward for a suitable reply.
    Thanks to all,
    Regards,
    Saby.

    Hi Maksim,
    Thanks for your reply..but i would also like to know can we directly use the Change Password Iview "persoUserPassword" from the portal. Can i directly Pass the URL of this iview from the portal to a "Change Password" link in the web dynpro application, so that when the user click this link he should be able to see this Iview on his/her mobile device and should be able to change the password from there. But i dont know whether this iview will appear properly on the mobile device or we have to have a custom web dynpro application for this purpose...Please reply with a suitable answer.
    Thanks in advance.
    Regards,
    Sarabjeet Singh.

  • Accessing Tables using DB link .

    Hello Friends,
    I have a development and production env.
    I created a public DB link in Development say mylink .
    Trying to access the developement table from production using the following command say to access table x
    From PROD accessing DEV table x using dblink
    select * from x@mylink ;
    Got the error as :
    ORA-02019: connection description for remote database not found
    02019. 00000 - "connection description for remote database not found"
    Any idea on this why this error is coming ..
    thanks/kumar

    I have a development and production env.
    I created a public DB link in Development say mylink .
    Trying to access the developement table from production using the following command say to access table x
    From PROD accessing DEV table x using dblink
    select * from x@mylink ;You are trying to execute the query in PROD database. This query uses a DB link which points to the DEV database.
    Very simple to understand : Since you are using the DB LINK in PROD database, obviously it should be in PROD area... right?
    Just imagine you are using an object (the 'DBLINK') in PROD and it doesn't exist here. Got it?
    SELECT * FROM x@mylink;
    Here,
    x -- table in DEV database
    mylink -- DB LINK in PROD database (pointing to DEV)
    Please try this.
    HTH
    Edited by: ranit B on Dec 25, 2012 12:24 AM

Maybe you are looking for

  • How to transfer music CD's from one itunes account to another same computer

    Bought my husband a ipod for Christmas. I have had one for awhile so I have many songs from itunes and CD's on my account. I have figured out how to transfer my paid songs from itunes to "his" itunes account, but I do not know how to get my CD's that

  • Iphone 4s really low sound

    Hello, From some months I experience the problem with the sound of the iPhone 4s. The sound is really low. You can only hear it if you put your ear very near to the speakers. I've tried everything. Settings -> Sounds to max. Restarting the iPhone. On

  • HT2623 I would like to change my iCloud email address.

    I would like to change my iCloud email address but don't know how.

  • Tutorials on Windows do not recognized default JSP URI

    On Windows 2000 as well as XP I get the following default message when I try to run any tutorial I create by following the tutorial instructions. However, when I ran the pre-built JATO samples they run OK. It seems there is some URI context path prob

  • Playlist of podcasts stopping after each podcast

    I manage which podcasts, and the order, I want to listen to using a playlist and until recently this worked as I wanted, i.e. when one podcast had finished playing my iPod started playing the next podcast in the playlist. Now it seems to be stopping