Problem with Master -Details forms in seperate pages

10-11  Source: Network gathering  Views:1 

Advertisement
Hi ,
Below is the scenario:
I have Institution and a department tables where there is a foreign key relation between the tables. So now i have two entity objects for the 2 tables and 2 view objects(DepartmentView,InstitutionView) from the entity objects.
I also have a view link between them.I made a master-detail relation between them in the datamodel using the view link.So my appmodule now has getters for the department view,institution view and viewlink.
I now have a jsp page "createInstitution.jsp" which contains a form for the institution , i have a "next" button on the same jsp which calls a method in my appmodule class .This methods just inserts the record into the Institution view. In this method i am able to see what the user entered in the form by getting the viewrow record like the below code :
InstitutionViewRowImpl newInstitutionRow=(InstitutionViewRowImpl) getInstitutionView().first();
The next button navigates to the next page "listDepartments.jsp" which contains the list of departments that are added. This page has a button "Add Department" which takes to to the "addDepartment.jsp" page which shows a form for adding a department. This page also has a button which calls a method in app module class. The method just inserts the record into the view(DepartmentView)
Here when i say
DepartmentViewRowImpl newDepartmentRow=(DepartmentViewRowImpl ) getDepartmentView().first();
the newDepartmentRow is null.
Also on the addDepartment.jsp form , i had used a output field to see what the parent id was and interestingly the parent id is 75 which is first institution in the database. It should have been "-10" , a temporary id assigned.
Can someone please tell me what is the problem with my approach?
I don't understand why you are using a method on your button to insert the record into the table - An Oracle ADF Form will do the insert for you by default without any coding.
See the create pages in these tutorials:
http://www.oracle.com/technology/products/jdev/11/cuecards/adf_set_21/ccset21_ALL.html
http://www.oracle.com/technology/obe/obe11jdev/11/dev_ui/developuserinterface.html#t2s5
The method that you are calling just returns the first record in the rowset - I don't see how it has anything to do with actually inserting the data into the table.
Related articles
  • Problem with Master -Details forms in seperate pages 10-11

    Hi , Below is the scenario: I have Institution and a department tables where there is a foreign key relation between the tables. So now i have two entity objects for the 2 tables and 2 view objects(DepartmentView,InstitutionView) from the entity obje

  • Problems with Master-Detail Form not retrieving Detail Rows 11-30

    Portal 3.0.7.6.2 on NT I am having problems with a Master-Detail Form not retrieving Detail Rows. Sometimes it retrieves all, sometimes about 50%, the majority of the time it's not retrieving any. If it never retrieved any I would suspect that the 'j

  • Problems in Master-Detail forms when the detail contains LOVs 11-30

    I am having problems with master detail forms when the detail contains and lov. In my detail form I have a messageLovInput field that returns 2 values (code and description). When the lov window returns both values the messageLovInput disappear from

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

    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. ThanksHi James, I think that Mike is suggesting that you create a SQL View over the table and

  • Problem in Master Detail form when using ADF table for Detail 10-11

    hi, jdev version-11.1.2.1.0 i have create Master detail form using datacontrol drag as ADF Master Form Detail Table. Now when i create a new row in Detail table using CreateInsert button a blank new row created on the top of detail table. and other r

  • Auto Query in Master Detail Form using dynamic page doesn't work 10-11

    I created a Master-Detail form, and implement AutoQuery using a dynamic page with the following code : <HTML> <BODY> <ORACLE>DECLARE nre_ VARCHAR2(100); BEGIN nre_ := emp_nre; if nre_ is not null then net_portal.Popula_Agregados(nre_); n

  • JTable problem in master detail form 10-11

    I've created a master detail form. There is only one Navigation bar for both master and detail. Detail has a JTable component. JTable doesn't get focus when it doesn't have any row and I am uanble to insert new rows. To cope with this problem I've ad

  • Post-trigger problem in master detail form. 10-11

    I have designed a master detail form having two data blocks. in detail data block there is a post-query. when i tried delete one record in master block an error occurred ie 'frm-40654. Record is updated by another user re-query to see changes'. in de

  • Problem in Master Detail form 10-11

    Hello I am new to Form Developer and the question I am asking may be very simple for experienced programmers but as I said I am new to forms development so I am finding it a bit hard. I have got the following three tables in database. 1. Student (rol

  • Problem with Master-Detail web page tutorial 10-11

    My student asked me about this problem: I just completed the following Master-Detail tutorial... http://www.oracle.com/technology/products/jdev/collateral/4gl/HO_Workshop/hos1_1/HOS1_1_ADF_Forms_Designer.pdf ... The problem here is that when I try to

  • Detail-Disclosure problem with Master- Detail VO 10-11

    Hi, I have UIX pages based on Master - Detail VO, detail data being shown when you press Detail button on the left, detail data display in the BC4J Table correctly, but I am able to update only the last record of the rowset. when I click on the first

  • Dynamic LOV problem in Master Detail form in 3.0 10-11

    I am using Master detail layout for my app, In detail there is a LOV depending on the value of one of the items in master. LOV statement is like this select col1 a,col1 2 from test_tab where col2 = :P2_VAL ; Note: :P2_VAL is the value of the one of t

  • Problems with Master / Detail created in backing-bean programmatically 11-30

    We are developing with JDeveloper 10.1.3.3 and ADF. We have 2 jspx. In the fisrt one we select some information and we create the master/detail in the backing-bean programmatically using createRow() and insertRow() in both ViewObject. In the second o

  • Problem in master-detail form on "Apply" 10-11

    Hi experts, I've got a master-detail OAF page and in the details resultsTable (based on a VO, which is based on an EO) i've 1. one messageLovInput item +"Location(View attr: LocationCode[transient])"+. 2. two messageTextInput items +"Locati

  • Problem with master/detail relationship 10-11

    Two tables : Master_table: Customer_no primary key Buyer_seller_type primary key Product_code primary key Detail_table Branch primary key Customer_no primary key I altered detail_table and added 2 more primary key fields: Buyer_seller_type primary ke

  • Performance Problem with Master-Detail Views 11-30

    Hi, I have developed a JSP-Applikcation with the master-detail views. I would like to report a bad performance at fetching data records from the detail view, because all records from master view have firstly to be retrieved to locate right row (range

  • Master Detail Form is ignoring the 4th join condition 11-30

    Hello All, I have master detail relationship between two tables with a composite foreign key (of 4 columns). I'm creating a master detail form in O9iAS Portal 3.0.9.8.0 on these 2 tables successfully with no errors. The only thing I have noticed, is

  • Field values erases when Add Row button is pressed in Master Detail Form 10-11

    Hi, I am using APEX 4.0. There is a master-detail form in a page, this has 5 rows in it by default, has a Add row and a Delete button. I face two problems now: 1. When the values are entered in all the 5 rows, that are in default, and Add Row button

  • Master/Detail form with modal edit 10-11

    I have a master/detail form that I generated using the wizard that I want to change to have a modal Edit button; i.e. the behavior I want is that the form view is initially read-only and you then have to click an Edit button to make the form editable

  • Master Detail Forms with 2 composite primary keys - Is there a workaround? 10-11

    Hello All, I have been searching for a workaround to the maximum 2 part primary key restriction on the multi-row updates, and master-detail forms, and am hoping that someone can help me. I am using HTMLDB v2.0.0.00.49 with IE 6 against a 9.2 DB. I su