Jdeveloper 11.1.1.2.0 : Master Detail Using Fragment Error
Hi
When developing a master detail solution, using a page fragment, I have encountered the following issues. I have followed forum articles and My Support solutions with success. The steps I used to create the solution is as follows;
1. Create ADF model project with 2 entities sharing a master detail relatiuonship.
2. Ensure that FK assocation has Behavior property Composition Association checked.
3. Test application module. Create works on both master and detail tables.
4. Create ADF view controller project.
5. Create a new task flow, with page fragments and add page to flow.
6. Add master detail VO to created page fragment.
7. Surround tables with Panel Collection components.
8. Add toolbar and buttons to createinsert into master and detail tables.
9. Add PPR to both tables for refresh when createinsert actions are performed.
10. Create test page.
11. Add task flow as region to page.
12. Run adfc-config.xml
13. Click on createinsert of master table. Capture data.
14. Click on createinsert of detail table.
15. Error stack is generated, JBO-25030 Detail entity with row key null cannot find or invalidate it's owning entity.
I then created a JSF page and added the tables directly onto the page. I successfully created a master and a detail record.
I then checked the Cascade Update Key attributes on the association and added the following code to the master ViewRowImpl class;
@Override
public void setNewRowState(byte state) {
if (state != Row.STATUS_INITIALIZED || getNewRowState() != Row.STATUS_NEW) {
super.setNewRowState(state);
}
}
I ran the page containing the region and the following error was generated;
<Utils><buildFacesMessage> ADF: Adding the following JSF error message: Attribute RegionId in Regions is required.
oracle.jbo.AttrValException: JBO-27014: Attribute RegionId in Regions is required.
I then changed auto-submit to true for the PK on the master table. This produced no error, however only the master records PK is committed to the database, other attribute values are ignored and the detail record is not committed.
Regards
Leon.