New inserted detail row is not showing through accessor

I have to insert master and detail row. I insert row in master view  and then I get detail row using getAttribute on master view. Then I insert row into detail row. Result is one inserted master row and no data display in detail view.
How ever in managed bean when I get master view using finditerator and then get detail row also using finditerator on the specific page then rows inserted on master and detail view appear.
DCIteratorBinding dcIter =             ADFUtils.findIterator("PlotMst1Iterator");
ViewObject mvo = dcIter.getViewObject();
mvo.insertRowAtRangeIndex(0, row);
mvo.setCurrentRow(row);
Row row = mvo.createRow();
// DETAIL ACCESSOR  not working
  //  RowSet Pd = (RowSet) row.getAttribute("PlotDtl");
DCIteratorBinding dcIter2 =       ADFUtils.findIterator("PlotDtl2Iterator");      
ViewObject dvo = dcIter2.getViewObject();
nvp.setAttribute("FabricCode",r.getAttribute("FabricCode"));
Row drow = dvo.createAndInitRow(nvp);      
dvo.insertRow(drow);   

Hi,
its a classical programming mistake you do. You create a new row on the model layer and not the binding layer. The proper way of doing this would be to
1) either create a method binding for the "CreateInsert" operation in the PageDef file and call it from there
or
2) DCIteratorBinding dcIter = ADFUtils.findIterator("PlotMst1Iterator");
    Row rw = dcIter.getRowSetIterator().createRow();
Same for your attempt to create the detail row. Again you can expose the createInsert operation in the PageDef file or use the RowSetIterator. As you create a master and detail row at the same time, be aware of a constraint problem that may arise from this as you have no guarantee that the master is inserted first. Read this http://docs.oracle.com/cd/E35521_01/web.111230/e16182/bcentities.htm#CEGJAFCF to learn about the problem.
Note that use case often matters. While I can see where your coding goes wrong, I can't tell if your approach in general could be chosen better
Frank

Similar Messages

  • Master-Detail and Auto Insert Detail rows

    Apex 3.0
    I'm trying to do a Master-Detail form. I have it set to stay on the same page when I Create a new Master Record.
    Now, what I would like to do is auto insert data into the Detail Rows some predefined information and have it ready for the user to enter the rest of the information. I did this by creating a Page Process to trigger on the Add Row button for the Details region. The code I used is:
    begin
    insert into purch_insurance_type (Contract_ID, INSURANCE_TYPE) values(:P7_Contract_ID, 'General');
    insert into purch_insurance_type (Contract_ID, INSURANCE_TYPE) values(:P7_Contract_ID, 'Automobile');
    insert into purch_insurance_type (Contract_ID, INSURANCE_TYPE) values(:P7_Contract_ID, 'Excess');
    insert into purch_insurance_type (Contract_ID, INSURANCE_TYPE) values(:P7_Contract_ID, 'Workers Comp');
    insert into purch_insurance_type (Contract_ID, INSURANCE_TYPE) values(:P7_Contract_ID, 'Others (Builders Risk)');
    end;
    P7_Contract_ID is the PK on the Master table and I predefine the Insurance Type. The rest of the table the user is able to enter as needed.
    When I run it, the new rows show up but the Insurance Type is NULL and browsing from one record and back the new rows are gone. It seems like the PK for the Detail rows are not being filled. I have a Sequence Trigger set to fire on Update:
    CREATE OR REPLACE TRIGGER "BI_PURCH_INSURANCE_TYPE"
    before insert on "PURCH_INSURANCE_TYPE"
    for each row
    begin
    if :NEW."INSURANCE_TYPE_ID" is null then
    select "PURCH_INSURANCE_TYPE_SEQ".nextval into :NEW."INSURANCE_TYPE_ID" from dual;
    end if;
    end;
    ALTER TRIGGER "BI_PURCH_INSURANCE_TYPE" ENABLE
    What am I missing? Any ideas or suggestions?

    Hi All!
    I think there is no solution to this problem, only single selection is the solution.
    If any one has anyother solution plz let me know.
    Thanks and regards.
    Abbasi

  • I tried to rename a file, it gave me an error message (can't remember the number - 43??) and then the file disappeared from the original folder. When I do a search, the file comes up under the new name, but it does not show a path, and even though preview

    I tried to rename a file, it gave me an error message (can't remember the number - 43??) and then the file disappeared from the original folder. When I do a search, the file comes up under the new name, but it does not show a path, and even though preview shows the contents, I can't open the document (Powerpoint) and I can't move the document. I tried "Copy" and paste but it doesn't work. I tried "Share" with Airdrop and iChat, but the file is inaccessible. When i try to rename the file, it says the filename is too long.
    When I try to open it, it says the alias is not good, and asks if I want to fix the alias. I'm afraid to do that and lose all access to this document.
    Right now, it feels like a ghost document - it is on the computer intact, but it is in an undisclosed location and inaccessible.
    Please help!!

    I was able to resolve this by repairing permissions, even though no permissions error was listed specifically for that file.
    I could also have recovered it through Time Machine, but I'm interested in knowing how not to have this happen again!
    I was afraid of rebooting and possibly losing track even of the ghost.
    I did not try EasyFind - I'll keep that in mind next time.
    Thanks for all the comments.

  • I purchased two tv shows on my new ATV2, but they do not show up in iTunes on my computer. Was hoping to download to ipad2 for travel. Help!?.

    I purchased two tv shows on my new ATV2, but they do not show up in iTunes on my computer. Was hoping to download to ipad2 for travel. Help!?.

    Welcome to the Apple Community.
    Have you tried the 'Purchased' option in the top right corner of the Store window in iTunes

  • I just bought a new Retina Display macbook pro, and I plugged in my iPod touch (4th gen) into the new computer, but it will not show up, even after I typed in the passcode. How do I get my iTouch to sync with my new computer without restoring my itouch?

    I just bought a new Retina Display macbook pro, and I plugged in my iPod touch (4th gen) into the new computer, but it will not show up, even after I typed in the passcode. How do I get my iTouch to sync with my new computer without restoring my itouch?

    iOS: Device not recognized in iTunes for Mac OS X

  • My account is saying it can't connect - I know I have new emails but they're not showing in my inbox

    My account is saying it can't connect - I know I have new emails but they're not showing in my inbox. Thank you

    http://support.apple.com/kb/HT2519

  • I have added two new extension on CUCM, Directory not showing in attendant console even after resynch on CUCM and attendant cosn

    I have added two new extension on CUCM, Directory not showing in attendant console even after resynch on CUCM and attendant cosnole
    Any idea?

    Hello,
    Can you tell us what versions of CUCM and CUxAC you are using?  Just extensions alone in CUCM will not sync to the corporate directory within the attendant console application.  You will at least have to have user's associated with those extensions and depending on your rule set within the console that should then bring those extensions into the console directory.
    Thanks,
    Tony

  • I have a new hard drive. iPhoto does not show as purchased in App Store although I had it on the old hard drive. How do I reinstall it without buying it again?

    I have a new hard drive. iPhoto does not show as purchased in App Store although I had it on the old hard drive. How do I reinstall it without buying it?
    Thank you.
    John

    Depends on where you got it - if it came on yoru compujter then you need to have accepeted it in the App store - and it will be in your purchases when you log in with the Apple ID that you used to set up your computer - it mahy be hidden - if you do not find it unhide applications in teh App store
    LN

  • My new mac book air will not show old emails.  how can i fix this problem

    my new mac book air will not show old emails.  how can i fix this problem

    The answer depends on a number of factors, such as the following:
    If you have more than one email account, does this problem affect one, some, or all of your accounts?
    Where did you last see this mail -- in your Inbox(es)? in some other folder(s) outside your Inbox(es)? somewhere else?
    How old is the missing email -- yesterday? just before you got the new computer? over a week? over a month? over a year?
    How are you reading email -- with the builtin Mail application? with some other mail-reading application? with a web browser?
    How do you access your email on the server -- IMAP? POP? Exchange? web browser? other?
    What version of OS X is on your new computer -- Mavericks (10.9.x)? Mountain Lion (10.8.x)?
    Did you migrate your data and applications from your old computer when you set up your new computer?
    For example, if the missing mail is the mail that was in your Inbox before you got the new computer, you are reading it with the builtin Mail via POP, and you failed to migrate data, then the mail was left behind on the old computer. The same would be true if the mail was in "On My Mac" mailboxes and you failed to migrate data.

  • New Records in database do not show up in resultset

    Hi,
    I have seen very little on this but I have a MS Access database that I have records in. If I change one of those records, I see the change in the resultset which I am just printing out for now using System.out.println . So I add new records manually to the database just so I am some records to test with and those records do not show up in the resultset. After doing something (not exactly sure what as I did a lot), I happen to go back and then saw the new records. So I add some more and could not see those records. I AM closing my resultsets, connections, etc. I read something where someone had the same problem and thought something was being cached which seemed reasonable to me. So I tried rebooting for the heck of it and I still see only the previous records and not the new ones.
    Any ideas,
    Thanks,
    Karl

    Hi Karl,
    There are problems some times like the one you mentioned when you are using both manual and programatic inserts/updates/deletes.
    When ever u face any such problems look out for following :
    Check if all ResultSet, Statement and Connection objects are closed before exiting the code. That is normal exit and abnormal exit (due to any error/exception).
    After manual insertion save and close target table.
    If the problem still exists then try re-compiling your code after closing the your Access (*.mdb) database.
    I hope this will work for you.
    regards,
    Humayun

  • I have transferred my music to new computer but music is not showing in iTunes - although is on the computer as if I select a song from the folder it will play that song via iTunes. How can I get my music to show?

    I have transferred my music to a new computer following the instructions carefully but for whatever reason the music does not show on iTunes on the new computer. The music is there as I can access it via My Computer and if I select a song it will show in iTunes and play - however I can not do this for every single track! Can anyone suggest something I have done wrong????

    Media was moved via external hard disk, and I think I moved the iTunes Media folder after consolidating it.

  • When I open a new tab, my pins do not show up, and I cannot find the square with the 9 boxes to turn it on at the top, what do I do

    When I open a new tab, the page is blank, and I cannot view my pins. I tried searching for the box with the 9 squares in it at the top of the screen to turn it back on, but it does not show up. How do I get my pins back?

    Hello,
    First go to '''Tools''' >> '''Options''' >> '''Privacy''' >> '''Firefox will''' change to '''Remember history''', then go to '''about:config''' and search for '''browser.newtab.url''' change its value to '''about:newtab'''.
    *[http://kb.mozillazine.org/About:config about:config]
    Also:
    *[https://support.mozilla.org/kb/new-tab-page-show-hide-and-customize-top-sites New tab page]

  • New tables & indexes created do not show up in dba_segments view

    Dear all,
    I have created 3 tables and some indexes, but these objects do not show up in dba_segments view. Is this a normal behaviour? Previously, with dictionary managed tablespace, I can specify the minimum extent to create, when the table/index is created. But I'm not sure how the locally managed tablespace work. Please do advice. Thank you very much in advance.
    I'm using Oracle 11g R2 (11.2.0.1.0) for Microsoft Windows (x64), running on Windows 7.
    For the purpose of reproducing this issue, I have created the tablespaces as follow:
    CREATE TABLESPACE CUST_DATA
    DATAFILE 'd:\app\asus\oradata\orcl11gr2\CUST_DATA01.DBF' SIZE 512K
    AUTOEXTEND ON NEXT 256K MAXSIZE 2000K
    EXTENT MANAGEMENT LOCAL UNIFORM SIZE 256K
    SEGMENT SPACE MANAGEMENT AUTO;
    CREATE TABLESPACE CUST_INDX
    DATAFILE 'd:\app\asus\oradata\orcl11gr2\CUST_INDX.DBF' SIZE 256K
    AUTOEXTEND ON NEXT 128K MAXSIZE 2000K
    EXTENT MANAGEMENT LOCAL UNIFORM SIZE 128K
    SEGMENT SPACE MANAGEMENT AUTO;
    CREATE TABLE CUSTOMER_MASTER (CUST_ID VARCHAR2 (10),
    CUST_NAME VARCHAR2 (30),
    EMAIL VARCHAR2 (30),
    DOB DATE,
    ADD_TYPE CHAR (2) CONSTRAINT CK_ADD_TYPE CHECK (ADD_TYPE IN ('B1','B2','H1','H2')),
    CRE_USER VARCHAR2 (5) DEFAULT USER,
    CRE_TIME TIMESTAMP (3) DEFAULT SYSTIMESTAMP,
    MOD_USER VARCHAR2 (5),
    MOD_TIME TIMESTAMP (3),
    CONSTRAINT PK_CUSTOMER_MASTER PRIMARY KEY (CUST_ID) USING INDEX TABLESPACE CUST_INDX)
    TABLESPACE CUST_DATA;
    SQL> SELECT TABLE_NAME, TABLESPACE_NAME
    2 FROM USER_TABLES
    3 WHERE TABLE_NAME LIKE 'CUST%';
    TABLE_NAME TABLESPACE_NAME
    CUSTOMER_MASTER CUST_DATA
    SQL> SELECT INDEX_NAME, TABLESPACE_NAME
    2 FROM USER_INDEXES
    3 WHERE TABLE_NAME LIKE '%CUST%';
    INDEX_NAME TABLESPACE_NAME
    PK_CUSTOMER_MASTER CUST_INDX
    SQL> SELECT SEGMENT_NAME, SEGMENT_TYPE, TABLESPACE_NAME, BYTES
    2 FROM USER_SEGMENTS;
    no rows selected

    Prior to 11g, when you created a table or whatever, you automatically allocated one extent.
    This is now no longer true and depends on a parameter I don't remember.
    dba_segments is a summary of dba_extents.
    Obviously, if there is no extent allocated, the table (view is defined with inner join) will not show up.
    You could qualify this is as a bug and submit a SR to Oracle. But then the performance impact may be huge.
    Sybrand Bakker
    Senior Oracle DBA

  • New purchases in itunes are not showing up in the songs list only in new purchases

    I have the latest version of Itunes and my last purchases do not show up in the songs view of my library, only in the purchased songlist. This has never happened before, so I'm guessing something is wrong with this new version. Anybody else having this problem?

    Apple are not here just us users.
    Some people have reported that logging out ot the itunes store and logging in clears things
    Other people who use itunes Match have reported Store > Update iTunes Match works
    I agree it seems to be a bug but to let apple know about it you need to use the feedback in itunes

  • Result row is not showing expected result

    Dear All ,
    I have below  requirement to generate mix variance 
      PY Mix
    PY Mix Diff
      PY Mix
      Val Gr -
    0.00
    0.00
    1,015.6823529
    1,015.68
    0.00
    0.00
    52,486.5048653
    52,486.50
    0.00
    0.00
    2,836.1166667
    2,836.12
    0.00
    0.00
    45,582.8437071
    45,582.84
    Result
    0.00
    3,09,668.66
    -2,07,747.5092285
    1,01,921.15
    Result in Bex
    Expected Result
    PY Mix L- Used No definition in   Result
    Val Gr -    Used Sum in result
    PY Mix Diff  = Val Gr - PY Mix
    But above formula is not working for Result row ??
    expected 3,09,668.66 but showing 0.00
    Any ideas to crack this .
    All your valuable inputs are highly  appreciated .
    Regards ,
    Hari

    Dear Suman 
    Thank you so much for your reply .
    PY Mix and Val Gr KFs both key figures  has got same definition(Same formula ).So i cant use Summation for both KYF in Exp Agge
    For Val Gr   -Result Row should be sum of values in Column , i have maintained no settings .And showing value as expected
    Val Gr -(CKF)
    1,015.68
    52,486.50
    2,836.12
    45,582.84
    1,01,921.15 -Result (Sum along columns)
    For PY Mix  - Result Row should be as per formula defined , i have maintained summation in Exp aggregation  .And showing value as expected
    PY Mix -(CKF)
    1,015.68
    52,486.50
    2,836.12
    45,582.84
    -2,07,747.50-Result (According to formula used )
    But When i use these to kyf in another formula Result row are not calculating as per Expectation
    PY MIX DIFF  = Val Gr - PY Mix
                              3,09,668.66 (expected )
                            = 0 (but final result )
    any other inputs to make it
    Regards  ,
    Hari

Maybe you are looking for