BC4J - Inserting Master/Detail records in same transaction.

I know this is possible, but I seem to be missing something to allow it to happen within BC4J.
I'm creating a RowSet off of a View Object and inserting new Rows into this RowSet. This RowSet represents my child/detail records for insert into a child table.
I then create a new Row off of another View Object. This row represents my Master/parent record for insert into a parent table.
All of the above is being done in the same applicationModule transaction with locking mode set to Optimistic.
Before I commit the transaction, I grab the next sequence # to use as the primary key for the master record and the foreign key for the child records. I apply those to the newly created child rows and the newly created master row.
However, when I commit I continue to get a JBO-26041: Failed to post data to database during "Insert": error due to ORA-02291: integrity constraint (CUST_LICENSES_FK4) violated - parent key not found
If everything was created in the same transaction, why won't this allow me to insert into both tables with the correct primary/foreign keys? It's almost as if the child records are being inserted first prior to the parent record.
Any ideas?
Thanks in advance..
Teri Kemple
TUSC
[email protected]

However, when I commit I continue to get a JBO-26041: Failed to post data to database during "Insert": error due to ORA-02291: integrity constraint (CUST_LICENSES_FK4) violated - parent key not found
If everything was created in the same transaction, why won't this allow me to insert into both tables with the correct primary/foreign keys? It's almost as if the child records are being inserted first prior to the parent record.This is due to the order of rows being posted. In this case it seems the detail row is getting posted before the master.
To avoid such situations, either you may implement your own post ordering by making sure that when a detail is to
be inserted, it's master is inserted or you may use "Composition Association" flag in the association wizard between
the master and the detail entities to let the framework manage a tight composition relationship between the two entity
types. BTW, there was another definitive thread recently on inserting master-detail in the
same transaction, but the forum search engine is so useless I can't find it. Anyone
have the msgid handy or know how to find that thread again??
FYI: the help describes the Composition flag functionality in terms of the Master record already existing in the DB. In our problem here, the Master is being inserted in the same transaction. Thus needs to be posted FIRST.
I got a integrity constraint exception too, then set the composition flag and now I get:
500 Internal Server Error
oracle.jbo.InvalidOwnerException: JBO-25030: Failed to find or invalidate owning entity.
     void oracle.jbo.server.EntityImpl.create(oracle.jbo.AttributeList)
     void gov.ga.gdc.otf.bc.JotfWithdrawalsImpl.create(oracle.jbo.AttributeList)
     void oracle.jbo.server.ViewRowStorage.create(oracle.jbo.AttributeList)
     void oracle.jbo.server.ViewRowImpl.create(oracle.jbo.AttributeList)
     oracle.jbo.server.ViewRowImpl oracle.jbo.server.ViewObjectImpl.createInstance(oracle.jbo.server.ViewRowSetImpl, oracle.jbo.AttributeList)
     oracle.jbo.server.RowImpl oracle.jbo.server.QueryCollection.createRowWithEntities(int[], oracle.jbo.server.EntityImpl[], oracle.jbo.server.ViewRowSetImpl, oracle.jbo.AttributeList)
     oracle.jbo.Row oracle.jbo.server.ViewRowSetImpl.createRowWithEntities(int[], oracle.jbo.server.EntityImpl[], oracle.jbo.AttributeList)
     oracle.jbo.Row oracle.jbo.server.ViewRowSetImpl.createRow()
     oracle.jbo.Row oracle.jbo.server.ViewObjectImpl.createRow()
     void gov.ga.gdc.otf.appmodule.JOtfOffenderAppModuleImpl.insertWithdrawal(java.lang.String, java.lang.String, java.math.BigDecimal, oracle.jbo.domain.Number, java.lang.Integer, int)
     void gov.ga.gdc.otf.appmodule.JOtfOffenderAppModuleImpl.payOneObligation(java.lang.String, java.lang.String, java.lang.Integer, oracle.jbo.domain.Number, java.math.BigDecimal, int)
     void gov.ga.gdc.otf.appmodule.JOtfOffenderAppModuleImpl.payObligations(java.lang.String, java.lang.String, java.math.BigDecimal, oracle.jbo.domain.Number)
     void gov.ga.gdc.otf.appmodule.JOtfOffenderAppModuleImpl.receiveFunds(java.lang.String, java.lang.String, int, java.math.BigDecimal, java.lang.String, java.lang.String, java.lang.String, java.math.BigDecimal, long)TIA much! curt

Similar Messages

  • PLSQL logic to insert master detail records

    Hi All
    I have a requirement where I need to do the following.
    1: Have a headers and details table for some data that I need to insert
    2: Transactions need atomicity...ie If the header record fails then the details should still be inserted , but with an Error flag
    3: Needs good error handling
    I'm trying to come up with some logic like so
    1: Have a header cursor and a details cursor
    2: Have the lines for loop inside the headers for loop and then do the inserts
    3: If an exception is thrown for one record it should not error out the other records(this can be done with a begin end block)
    Does anyone have a better idea for this...Is it an efficient way of developing header- detail inserts?
    If someone has an example that I can go over I would appreciate that or a basic algorithm would do too..
    Thanks
    D

    851866 wrote:
    1: Have a headers and details table for some data that I need to insert
    2: Transactions need atomicity...ie If the header record fails then the details should still be inserted , but with an Error flagThis is the opposite of atomicity, what you describe is called data corruption.
    3: Needs good error handlingGood error handling is specific to the expected error and is defined by the specific business requirements.
    1: Have a header cursor and a details cursor
    2: Have the lines for loop inside the headers for loop and then do the inserts
    3: If an exception is thrown for one record it should not error out the other records(this can be done with a begin end block)
    Does anyone have a better idea for this...Is it an efficient way of developing header- detail inserts?No, using a cursor loop is as inefficient as possible.
    If someone has an example that I can go over I would appreciate that or a basic algorithm would do too..If you provide an example of the error you expect and what you are supposed to do in that situation then it is possible someone could provide an example algorithm.

  • What is the proper way to record line numbers in Master/Detail records?

    Guys and Gals,
    Been thinking about this for awhile, but thought it best to ask the people who really know what they are doing.
    What is the proper way to record & show line numbers in a Master / Detail record set?
    For example, take Master/Detail relationship Orders and OrderItems. Orders has a column Document_Number and OrderItems has Document_Number, Line_Number. Line_Number should contain the row number 1,2,3,4 ... etc. for each row in a document.
    Should I ...
    <ol><li>Add a sequence and a trigger in the database? The FusionOrderDemo does this, but then the sequence never "resets" and I've got row numbers that keep incrementing. So one document has rows 4,5,6 and the next document has 7,8,9 when they should both have 1,2,3.</li>
    <li>Programmatically take care of the row numbers? This seems like I'm asking for trouble. Anytime an insert or delete operation gets done, I'll have to iterate through rows and re-assign row numbers.</li>
    <li>Is there a way to assign row numbers in a table iterator (or data collection?) to an entity?</li></ol>
    Any suggestions would be appreciated. It's looking like #2 is my only option, but if anyone knows different I'd love the input.
    Will

    Thank you both guys.
    As John said, I believe I'm looking for a gap-free sequence per master record.
    The line number of the OrderItems table is the second half of the primary key. The first half of the primary key (DocumentNumber) is the foreign key to the Orders table.
    Think of it like line items on an order or invoice. For example, if you were talking to someone on the phone concerning an invoice, you might say, "The pricing for line item #3 is incorrect." In this case, it's good to have a common reference. Or imagine a Microsoft Excel spreadsheet with no row numbers displayed! You'd never get anywhere if you had to explain something over the phone.
    If this is tricky to perform, I take it using a sequence and trigger such as the Fusion Order Demo is the best way to approach the challenge for simplicity's sake?
    Will

  • How to create a master detail form on same page in apex 4.2.1

    Hi All,
    i need to design a master detail form on same page i am not finding an option in wizard from where i can do that.
    will appreciate your suggestions.
    Thanks

    Hi James,
    I think that Mike is suggesting that you create a SQL View over the table and join together the individual primary key values into a single, unique, pseudo primary key. You can still include the individual columns in the SQL but you can then use this new column as the primary key on a form. However, you would also need to create INSTEAD OF triggers to handle inserts/updates/deletes as SQL will not allow you to update tables through a view. (See: [http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28370/create_trigger.htm#i2064426] for the Oracle details on this or Re: How to update view resp. table for an example within Apex).
    Ideally, though, you should only really need one key column - is there any need for four?
    Andy

  • Master Detail on the same page PHP - MySQL

    Hi,
    Is it possible to create a page using spry master region and call MySQL data into a Spry detail region, like you do with xml data?
    Basically, is there a way to have master detail regions on the same page without using frames?
    Thanks
    Bert

    Thanks for that, very useful indeed.
    But isn't it going to be slow, first transferring the MySQL data to XML then reading XML to display the records.
    What is the advantage other then displaying master detail on the same page?
    Thanks
    Bert

  • Master-Details Record

    I have a Master and two details records. I need to generate report for the Master-Details record.
    I need to include some details from the Master table and some details from each of the detail tables.
    For example :
    In Master table: Employee_Number
    Employee_Name
    Company_Code
    Company_Name
    In Application Detail table: Application_Code
    Application_Name
    In Non-Application Details table: Non-Application_Code
    Non-Application_Name
    I need to include Employee_Name, Company_Name, Application_Name and Non-Application_Name in my report. How should I go about creating the report?and may I know what type of report style should I use?Should I use Tabular or Group Above?
    Thank for your help

    hello,
    you might want to start off with a regular master detail layout and then modify the layout manually to fit your needs.
    when running throught he wizard, you just select whichever fields you want to display.
    regards,
    the oracle reports team --pw                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Spry insert master/detail layout Can't get more than two columns?

    Ive been trying to get more than two columns just experimenting with spry data sets and can't with the layout option "insert master/detail layout"
    What am I doing wrong?
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <script src="SpryAssets/SpryData.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryHTMLDataSet.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryMasterDetail.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
    var ds1 = new Spry.Data.HTMLDataSet("benefitsdata.html", "bizben", {firstRowAsHeaders: false});
    </script>
    </head>
    <body>
    <div align="center">
      <div class="MasterDetail">
        <div spry:region="ds1" class="MasterContainer">
          <div class="MasterColumn" spry:repeat="ds1" spry:setrow="ds1" spry:hover="MasterColumnHover" spry:select="MasterColumnSelected">{column0}</div>
        </div>
        <div spry:detailregion="ds1" class="DetailContainer">
          <div class="DetailColumn">{column1}</div>
          <div class="DetailColumn">{column2}</div>
          <div class="DetailColumn">{column3}</div>
        </div>
        <br style="clear:both" />
      </div>
    </div>
    </body>
    </html>

    Hello,
    in addition to Sudarshan's statement about the discontinued support: In my SPRY library I found this "html_dataset_sample". Maybe it could help you. Here the source code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Untitled Document</title>
    <script src="SpryAssets/SpryData.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryHTMLDataSet.js" type="text/javascript"></script>
    <script type="text/javascript">
    <!--
    var ds1 = new Spry.Data.HTMLDataSet("benefitsdata.html", "bizben", {firstRowAsHeaders: false, useCache: false, tableModeEnabled: false, sortOnLoad: "column0", sortOrderOnLoad: "ascending", rowSelector: "tr.destroyed", dataSelector: "td"});
    ds1.setColumnType("column2", "number");
    ds1.setColumnType("column3", "number");
    ds1.setColumnType("column4", "number");
    //-->
    </script>
    </head>
    <body>
    <div spry:region="ds1">
    <table>
      <tr align="center" valign="middle">
       <th width="100" spry:sort="column0">Name</th>
        <th width="100" spry:sort="column1">Class</th>
       <th width="100" spry:sort="column2">Length(m)</th>
       <th width="100" spry:sort="column3">Crew Size</th>
       <th width="100" spry:sort="column4">Crew 1</th>
    </tr>
      <tr align="center" valign="middle" spry:repeat="ds1">
       <td width="100"><p>{column0.1}{column0.2}{column0.3}</td>
         <td width="100">{column1}</td>
       <td width="100">{column2}</td>
       <td width="100">{column3}</td>
       <td width="100">{column4}</td>
    </tr>
      </table>
    </div>
    </body>
    </html>
    Hans-Günter

  • Foreign key validation while creating master/detail record in document mode

    I am creating master/detail records in the document mode. And I am generating the master primary key in the create() method of the master Entity Object. Now I valdate the foreign key in the detail Entity Object's validateEntity() method by doing a query to the master table through some View Object.
    But since the master record has not yet been posted (since it hasn't been committed) to the database, this query does not return any record and the validation fails in detail object.
    And thus the create fails.
    Please let me know if this is the right approach for doing this. If so where I am going wrong? Else please let me know if there are any better approach to do this.
    Kunal

    Kunal:
    Use a code snippet like the following:
    --- Assuming you're in the detail EO's create method ---
    oracle.jbo.server.EntityDefImpl eDef = oracle.jbo.server.EntityDefImpl.findDefObject(<package-qualified-name-of-the-master-Entity-Object>);
    oracle.jbo.Row masterRow = eDef.findByPrimaryKey(this.getDBTransaction(), <foreign-key>);
    If the row does not exist, masterRow will be null.
    findByPrimaryKey first checks the entity cache (which will include your new master row(s)) and then go out to database (if it's not in cache).
    Thanks.
    Sung

  • Using EJB creating Master/Detail Record

    Hi All
    I would really in need of your help regarding how to show the information of master detail records in a single form
    eg: one text field with department Id and a Search button which should give relevent employees details working in that particular department.
    I tried with ADF business components it works fine..
    I need to do through pure Session Beans and Entity Beans(note : not thru using EJB:UseBean Tag)
    Please i will really appreciate your valuable help..
    Thanks All
    Have a Nice day
    Mohamed Anez

    Kunal:
    Use a code snippet like the following:
    --- Assuming you're in the detail EO's create method ---
    oracle.jbo.server.EntityDefImpl eDef = oracle.jbo.server.EntityDefImpl.findDefObject(<package-qualified-name-of-the-master-Entity-Object>);
    oracle.jbo.Row masterRow = eDef.findByPrimaryKey(this.getDBTransaction(), <foreign-key>);
    If the row does not exist, masterRow will be null.
    findByPrimaryKey first checks the entity cache (which will include your new master row(s)) and then go out to database (if it's not in cache).
    Thanks.
    Sung

  • Generate file with a master-detail records

    Hi everyone,
    I need your help, one more time.
    I want to generate a file in ODI that have two distincts records of the detail, a master-detail records. The first one record contain general data and second one contains a second level information about the previous.
    I got the result using a bad solution, loading the file line by line, but the file is so large and performace was very slow.
    The expected result is:
    001Purchase Order id 99
    002Item 1
    002Item 2
    001Purchase Order id 150
    002Item 1
    002Item 3
    001Purchase Order id 4870
    002Item 3
    Anyone has an alternative for that?
    regards.

    hello
    i belive you need to use pivot operator
    check out this blog
    https://blogs.oracle.com/warehousebuilder/entry/pivoting_data_in_owb
    rgds

  • Master-details records

    Hi Everybody,
    i have a requirement to show master detail records.to show data i have 3 tables
    they are 1) Flat_Master(flat_id,flat_desc,pic)
    2)Flat_Detail(flat_id,flat_face_id,flat_loc)
    3)face_tab(face_id,face_desc)
    in my jsf page i displayed flat_master as master records and flat_detail as detail records
    here flat_detail is updatable.so for flat_face_id i created a lov choice list based on face_tab table(ADF BC level).
    so when master record i changed, my choice list is not getting changed amd even when page load also for the first record also it is not selecting..
    How can i set this choice list value programatically based on master records?
    Any ideas can you please share with me?
    thanks
    KM.
    Edited by: Mr. Murali on Sep 13, 2011 3:21 AM

    pls provide me the detailed view.,
    what ur trying to say and wat s ur use case?

  • Insert Master and Detail in the same transaction

    I have 2 view objects : Students and Enrollments.
    Connecting those view objects, there is one view link :
    Cardinality : 1..* (One student can enroll several courses).
    This link is exposed in "Students" view object by the property "getEnrollments" and in "Enrollments" view object, by the property "getStudent".
    I am try to insert records first in Student table, and Enrollment table in the same transaction.
    The primary key for Student table is generatade by a sequence (database trigger)
    My code is :
    StudentListImpl studentView = getStudentList();
    StudentListRowImpl studentRow = (StudentListRowImpl) studentView.createRow();
    studentRow.setFirstname(student.getFirstName());
    studentRow.setLastname(student.getLastName());
    studentRow.setDatebirth(student.getDateBirth());
    studentRow.setStatusid("A");
    studentView.insertRow(studentRow);
    EnrollmentListRowImpl enrollmentRow = (EnrollmentListRowImpl) studentRow.getEnrollments().createRow();
    enrollmentRow.setCourseid("C-100");
    studentRow.getEnrollments().insertRow(enrollmentRow);
    The generated Student ID is not being retrieved by ADF and set up in Enrollment view object. So, database is firing foreign key violation (in Enrollment table - No student ID provided)
    How can achieve this goal? Insert in DETAIL table with the key generated for the PARENT table?

    Yes, ID attribute in Student EO is DBSequence.
    If I insert only Student it works. But when I try to insert an Enrollment for that just created Student (same transaction), the Student ID is not assigned to Enrollment EO.
    The code I use to insert Enrollment is :
    EnrollmentListRowImpl enrollmentRow = (EnrollmentListRowImpl) studentRow.getEnrollments().createRow();
    enrollmentRow.setCourseid("C-100");
    My question is :
    Since I am creating a new Enrollment row using view link acessors in Student VO (getEnrollments), will the Student ID (just generated by sequence) be automatically assigned to Enrollment VO?
    I am totally lost about this (inserting master and detail in same transaction) and I can't find documentation on this topic.

  • TooManyObjectsException inserting master-detail composed entities

    Hi all,
    I have read something similar in the blog, but I can't solve my problem.
    I am using JDev 11.1.1.0.2 and I have thi situation:
    1) a page where I can edit data, and pushing a button I can create a new record
    2) clicking on this button, starts a bounded task-flow (train) where I insert master (before) and detail (after) data.
    I have checked composition flag in the associations that links the two entities
    When I try to commit I have this error:
    oracle.jbo.TooManyObjectsException: JBO-25013: Too many objects match the primary key oracle.jbo.Key[... ].
         at oracle.jbo.server.EntityCache.throwTooManyObjectsException(EntityCache.java:431)
         at oracle.jbo.server.EntityCache.addForAltKey(EntityCache.java:818)
         at oracle.jbo.server.EntityCache.add(EntityCache.java:404)
         at oracle.jbo.server.ViewRowStorage.entityCacheAdd(ViewRowStorage.java:2551)
         at oracle.jbo.server.ViewRowImpl.entityCacheAdd(ViewRowImpl.java:3139)
         at oracle.jbo.server.QueryCollection.populateRow(QueryCollection.java:2911)
         at oracle.jbo.server.QueryCollection.fetch(QueryCollection.java:2764)
         at oracle.jbo.server.QueryCollection.get(QueryCollection.java:1931)
         at oracle.jbo.server.ViewRowSetImpl.getRow(ViewRowSetImpl.java:4508)
         at oracle.jbo.server.ViewRowSetIteratorImpl.doFetch(ViewRowSetIteratorImpl.java:2899)
         at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2755)
         at oracle.jbo.server.ViewRowSetIteratorImpl.refresh(ViewRowSetIteratorImpl.java:2996)
         at oracle.jbo.server.ViewRowSetImpl.notifyRefresh(ViewRowSetImpl.java:2453)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:1047)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:873)
         at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2738)
         at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2715)
         at oracle.jbo.server.ViewRowSetIteratorImpl.getAllRowsInRangeInternal(ViewRowSetIteratorImpl.java:2101)
         at oracle.jbo.server.ViewRowSetIteratorImpl.getAllRowsInRange(ViewRowSetIteratorImpl.java:2148)
         at oracle.jbo.server.ViewRowSetImpl.getAllRowsInRange(ViewRowSetImpl.java:2730)
         at oracle.jbo.server.ViewObjectImpl.getAllRowsInRange(ViewObjectImpl.java:9131)
         at oracle.jbo.server.ViewRowSetImpl.findByViewCriteriaWithBindVars(ViewRowSetImpl.java:5191)
         at oracle.jbo.server.ViewRowSetImpl.findByViewCriteria(ViewRowSetImpl.java:4950)
         at oracle.jbo.common.AbstractListBinding.filterList(AbstractListBinding.java:580)
         at oracle.jbo.common.AbstractListBinding.filterList(AbstractListBinding.java:470)
         at oracle.jbo.server.RowImpl.applyListBindings(RowImpl.java:901)
         at oracle.jbo.server.RowImpl.checkAndApplyListBindings(RowImpl.java:601)
         at oracle.jbo.server.ViewObjectImpl.afterRowUpdate(ViewObjectImpl.java:11240)
         at oracle.jbo.server.ViewObjectImpl.sourceChanged(ViewObjectImpl.java:11492)
         at oracle.jbo.server.EntityCache.sendEvent(EntityCache.java:1150)
         at oracle.jbo.server.EntityCache.deliverEntityEvent(EntityCache.java:1164)
         at oracle.jbo.server.EntityCache.notifyColumnAndBlgChange(EntityCache.java:1220)
         at oracle.jbo.server.EntityImpl.notifyAttributesChanged(EntityImpl.java:6781)
         at oracle.jbo.server.EntityImpl.notifyAttributesChanged(EntityImpl.java:6762)
         at oracle.jbo.server.EntityImpl.populateAttribute(EntityImpl.java:6486)
         at oracle.jbo.server.EntityImpl.refreshFKInNewContainees(EntityImpl.java:5575)
         at oracle.jbo.server.OracleSQLBuilderImpl.doEntityDML(OracleSQLBuilderImpl.java:514)
         at oracle.jbo.server.EntityImpl.doDML(EntityImpl.java:7779)
         at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:6162)
         at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:3253)
         at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:3061)
         at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:2180)
         at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2382)
         at oracle.adf.model.bc4j.DCJboDataControl.commitTransaction(DCJboDataControl.java:1565)
         at oracle.adf.model.binding.DCDataControl.callCommitTransaction(DCDataControl.java:1407)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1293)
         at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2126)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:697)
         at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.executeEvent(PageLifecycleImpl.java:392)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding._execute(FacesCtrlActionBinding.java:159)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding.execute(FacesCtrlActionBinding.java:118)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.el.parser.AstValue.invoke(AstValue.java:157)
         at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
         at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1227)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:70)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:274)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:74)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:70)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:274)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:74)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:458)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:763)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:640)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:275)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:175)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:181)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:85)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:279)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:239)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:196)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:139)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at oracle.security.jps.wls.JpsWlsFilter.doFilter(JpsWlsFilter.java:102)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:65)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3496)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

    I have solved.
    I have to flag the composition association in the entity object

  • Populating a master detail on the same form

    Hi everyone,
    Here is my use case using the HR as an exemple. I need to create a form where I can create an new department (master) and a number of employees for that department (detail) on the same page. On my model I have a Employee view and Department view linked with a foreign key. I created a transient in the department view called nbempl (number of employee). nbempl is linked to a selectitem list where the user can select a number of employee to create for that department. I'm using PPR to display a number of detail rows for the user to fill in.
    My question is how do I create x number of detail rows when the user select a number from the drop-down list? do I need a valueChangeListener on nbempl and create the rows there? could someone point me to examples similar to this.
    Thank you

    Thanks for your reply.
    I looked at the example but my use case is different. I need to populate both the master and detail tables with new records using one form, that is one new record for dept. and any number of detail records as selected by the user. Here is the form i'm working on:
    <h:form>
    <af:panelForm>
    <af:inputText value="#{bindings.DepartmentId.inputValue}"
    label="Dept ID:"
    required="#{bindings.DepartmentId.mandatory}">
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.DepartmentId.format}"/>
    </af:inputText>
    <af:inputText value="#{bindings.DepartmentName.inputValue}"
    label="Dept Name"
    required="#{bindings.DepartmentName.mandatory}">
    <af:validator binding="#{bindings.DepartmentName.validator}"/>
    </af:inputText>
    </af:panelForm>
    <af:selectOneChoice value="#{bindings.DepartmentsView1NbEmpl.inputValue}"
    label="How many employee do you want to add for this dept.:"
    autoSubmit="true" id="nbempl" immediate="true">
    <f:selectItems value="#{bindings.DepartmentsView1NbEmpl.items}"/>
    </af:selectOneChoice>
    <af:panelGroup partialTriggers="nbempl">
    <af:panelGroup rendered="#{bindings.DepartmentsView1NbEmpl.inputValue > 0}">
    <af:outputText value="#{bindings.EmplTable.inputValue}"/>
    <af:forEach begin="1" end="#{bindings.DepartmentsView1NbEmpl.inputValue}" varStatus="stat">
    <af:panelForm>
    <af:inputText label="Employee ID:" value=""/> <----------------------------- What do I put here ??
    <af:inputText label="Employee Last Name:" value=""/> <----------------------------- What do I put here ??
    </af:panelForm>
    </af:forEach>
    </af:panelGroup>
    </af:panelGroup>
    </h:form>
    The selectOnChoice let the user select a number of detail records to add and the PPR will refresh the form and display a number of input fields in a forEach loop for employee details. Do I need to add a valueChangeListener to the selectOneChoice and insert new rows using a custom method? Is there a better way to do this? what kind of binding do I need in the page def?
    Thank you.
    Edited by: yvesg2 on Sep 17, 2009 5:59 AM

  • Copying master detail records in oracle forms

    Hi,
    Have a master details block , using a copy button i copy the existing contents
    in both the blocks , than primary key and foreign key value of the both blocks are changed and i want to save it as a new record.
    Problem is when i do the above it goes to record status as update
    it is not doing insert with the values.and throwing an error wrt referential integrity
    pls help
    with thanks

    This forum focuses on EBS. For Form specific questions, you can try Forms

Maybe you are looking for

  • Run Form to test just disappears

    Hi, I have been developing (with no probs) on Form Builder 9i, I have since found that the customer this is for requires it to be backwardly compatible with Forms 6i. I did try to put 6i on the same machine as 9i, I had major tns probs so gave up, if

  • Using Loop to read value

    Hello !!  I am detecting rising and falling edge of a square wave in a loop.......but i am not able to do it.....kindly help........sample code is... Case 1 : do Val = readhardware(channel number); if (val >2) break; }while(1)

  • Question about Tasklists

    I have a weird question about task lists. lets assume I created a task list for a user and enering values in to a data form is one of the task and promoting the planning unit is the next step. and assume the user has gone through the tasks and comple

  • Where is the link for downlaoding a purchased product, serial number is available.

    I purchased Adobe Acrobat V 10 in 2011 and I made a single installation from a CD. I bought a laptop without CD-Drive and want downloading Adobe Acrobat. I have a serial number. I do not find the link for downloading this product.

  • General questions on buying a new Mac...

    hey guys, i am looking to buy a new mac in the next year or so.  i currently have the powerbook g4 from when i went to school and its running very slow these days and i couldnt upgrade past leopard because of the processor.  anyways, im wondering wha