Insert Record in Master-Detail by UIX Pages

I am using Jdeverloper10g v10.1.2 ,ADF,UIX Pages
My problem is :
How i can insert a record by UIX Page , Because when i try to inserted a record by click on Create Button there is no action happen .
So , is there any document can help me in Master_Detail_By_UIX
with regards
Naif

Hi Leo,
I know that but my application is already set up and I have all the reports and forms in place. However I do not know how to enter an update/insert statement when calling my form. I only can have update or insert.
for update is working correctly and the reports/forms affected are quite complex I do not want to change anything on it but enter a detail recordset for each record in master table only containing foreign key id and id. then the update statement will work. At the moment I have to save the form (detail table) once to create th primary id and after that I can store values... but that is not feasible for end users...
Tino

Similar Messages

  • Insert Record in Master-Detail block

    I am using JDev 10.1.2, Struts, ADF and JSP
    I have a Master-Detail relationship. As the master table(Course) is browsed , the details(Students) record keep changing. Now I want to insert records to the detail (Students) block alone. I am generating the Students id using Sequence, but I want use the Course Id that is being browsed for the new record inserted. How do I do this.
    I used the 'Read Only Dynamic Table' for the Details table and used the create button and forward it to create jsp. When I click on create button, it does go to the create jsp, but the the row is not blank. what do I have to do.
    Any help will be appreciated.

    Hi Shay,
    Thanks for the response. At least I'm getting some response after so long a time.
    I'm not sure what are you looking at. But this is what I have.
    I have a browseCourse.jsp that displays the courses in the master and students in the detail. I have a create button for the detail, and my code looks like this.
    public class BrowseCourseAction extends DataForwardAction
    public void onCreate (DataActionContext actionContext)
    actionContext.getHttpServletRequest().getSession().setAttribute("type", "create");
    if (actionContext.getEventActionBinding() != null)
    actionContext.getEventActionBinding().doIt();
    actionContext.setActionForward("createstudent");
    when the user click on create button it shows the createstudent.jsp. My question is how to set the course id for the new student that is about to be created.
    What do I have to do for this?

  • Insert record in master detail relationship

    Hi,
    I have the following situation. I have two tables (master and detail in 1:1 relationship). What I want to do is to skip through the master table and insert a record into the detail table containing only the id of the master table (foreign key column in detail table).
    My tables look like this:
    Master:
    ID
    NAME
    ADRESS
    Detail:
    ID
    DETAILS
    MASTERID (foreign key)
    For I am not experienced in PL/SQL does anybody give me an idea on how to do this. I think it is suitable to have a procedure solving this...
    Thanks in advance!
    Tino

    Here you go:
    CREATE TABLE dt_test_master
    (     id           number primary key,
         descr      varchar2(10)
    INSERT INTO dt_test_master VALUES(1, 'Master 1')
    INSERT INTO dt_test_master VALUES(2, 'Master 2')
    CREATE TABLE dt_test_child(id number, master_id number, col1 varchar2(10))
    alter table dt_test_child add constraint dt_test_child_fk_master
    foreign key(master_id) references dt_test_master
    CREATE SEQUENCE dt_test_child_id_seq
    CREATE OR REPLACE PROCEDURE p_CreateChild(     an_MasterId dt_test_child.master_id%TYPE,
    av_Col1          dt_test_child.col1%TYPE
    IS
    BEGIN
         INSERT
         INTO
              dt_test_child
              (     id,
                   master_id,
                   col1
         VALUES
              (     dt_test_child_id_seq.NEXTVAL,
                   an_MasterId,
                   av_Col1
    END;
    SQL> exec p_CreateChild(1,'Child1');
    PL/SQL procedure successfully completed.
    SQL> exec p_CreateChild(1,'Child2');
    PL/SQL procedure successfully completed.
    SQL> exec p_CreateChild(2,'Child1');
    PL/SQL procedure successfully completed.
    SQL> exec p_CreateChild(3,'Child1');
    BEGIN p_CreateChild(3,'Child1'); END;
    ERROR at line 1:
    ORA-02291: integrity constraint (TYLERD.DT_TEST_CHILD_FK_MASTER) violated - parent key not found
    ORA-06512: at "TYLERD.P_CREATECHILD", line 8
    ORA-06512: at line 1HTH
    David

  • Inserting records in master detail form

    I am moving an existing Webdb Application to portal. In the application there is a master detail form along the following lines
    Dept Id: 10
    Dept Name: IMS
    Employee ID Employee Name etc
    1586 Julie Wilks
    Currently users can insert/update/delete detail lines. When inserting, the dept_id foreign key is automatically inserted into the dept_id column in the detail table. My understanding is that for some reason this does not happen in portal. Instead, the user is expected to input any foreign keys manually. As this could lead to all sorts of problems I'd rather not have to do this.
    Has anyone found a means to get around this problem?
    If solutions have already been posted, please point me in the right direction as a search on the forum hasn't come up with anything.
    Many thanks,
    Julie Wilks

    Hi,
    Am I the only one having this problem?
    Thanks,
    Diana

  • How to create Insert & Update on master-detail form JPA/EJB 3.0

    Is there any demonstration or tips how to Insert record on master-details form for JPA/EJB 3.0 with ADF binding?

    I have master-detail forms (dept-emp). I drag the dept->operations->create method to JSF page. But when I click create button, only dept form is clear and ready for insert. But emp form is not clear. How can I add create method for this?
    Can you give some example how to pass the right object to the persist or merge method so that it can save both the two objects (master-detail tables)
    Thanks
    Edited by: user560557 on Oct 9, 2009 8:58 AM

  • Master Detail on same page

    Hi,
    I have a custom master detail requirement. The page is currently only for CREATE, no query requirement. There are 2 custom tables involved and a common column (process_id).
    When I only have the MASTER detail on the page (VO-EO) and save it is fine, saves to table1.
    Now I want to add the ability to save 1..* records in the detail table.
    So I navigate to page, enter the master data as above, tab down to the detail section and enter a number of fields (say 3 new rows of detail).
    What are the basic steps to go about this. I appreciate there is some information in the Dev guide but it is a bit complex for what I require I think.
    I am thinking (and currently tying).
    Create new EO for detail table
    Create new VO for detail
    Create an EO association (is this needed???)
    Create a View Link between master and detail.
    Associate the VO with the same AM as the master.
    Add a new table region to the form...
    Now this all works in that I can display above. What is required to allow me to save successfully after entering the data.
    This is an urgent request, so any help much appreciated.
    Robert

    PPR to the rescue!
    Try changing the singleSelection element to include your additional field in it's targets list. eg:
    <singleSelection
      model="${bindings.OtherView1Iterator}"
      text="Select and ">
      <primaryClientAction>
        <firePartialAction
             targets="_uixState MyOtherFantasticField"
             source="OtherView112"
             event="select"/>
      </primaryClientAction>
    </singleSelection>And you'll need to add an id to your field such as:
    <messageTextInput
      model="${bindings.blah}"
      id="MyOtherFantasticField"/>Hope this helps.
    CM.

  • Master-Detail in UIX-JSP

    Hi:
    How can i do a master-detail in UIX-JSP similar in functionality BC4J-JSP?. I haven't found an HOW-TO or guide.
    Thanks
    Marco

    Yes this is easily done.
    If you have a BC4J project with say Emp and Dept View Objects which are linked via
    a foreign key (there should be a BC4J FKDeptnoLink created), then all you have to do
    is generate a BC4J UIX JSP application.
    In a separate empty project, open the New gallery and select UIX-JSP -> Business Components JSP Application.
    Generate a default JSP application for your BC4J components. You can then run main.jsp
    to see the app.
    To see a master detail view of your app which is based on the Bc4J Link (FKDeptno) just click
    on link "FkDeptnoLink" on the left side..
    -Chris

  • Master-Detail in One Page, on CREATE master, details show wrong rows

    Hi all,
    (ADF Faces + BC, 10.1.3 su5)
    I am creating a master-detail add/edit page in ONE page.
    Master : ADF Form, with Create, Submit, Commit, Rollback operation/button
    Detail : ADF Editable Table, with Create, Submit, Delete operation / button
    When first called, the page display the existing master-details in the collection.
    When I press Create on master, I expect the detail table to be refreshed to BLANK, but it keeps on displaying the existing rows.
    Detail table only becomes BLANK after I Submit the newly created master first.
    So the question is :
    How to make the detail table BLANK after I press Create on master ?
    Thank you ,
    xtanto

    See section 10.4.3 "When to Use CreateInsert Instead of Create" in the ADF Developer's Guide for Forms/4GL Developers.

  • Unable to insert detail record using Master- Detail Form

    Hello All,
    I am new to Apex and we are using Apex 2.2.
    I am trying to create a Master-Detail page using the Wizard. Unable to insert the detail record as the foreign column value is not inserted. How can i assign this value to the child record before inserting? Hope you got my query.
    Pls reply asap
    Thanks
    Biju
    P.S - Can't upgrade to 3.0 yet

    G'day Guys,
    We just had to create a Child Tabular for Master Detail manually ourselves and finally worked out how to set the PARENT_ID field (Foreign Key fields). It was quiet easy after we finally found the little bugger :)
    Under The Reports Attributes for the tabular report, located the PARENT_ID field and edit it (column attributes). Goto the "Tabular From Element" and modify the following values:
    Default Type: Item (Application or page item name)
    default: PXX_FIELD_NAME
    Thats it, so when a new row(s) is added this field defaults to PXX_FIELD_NAME.
    Told you it was easy, but I've just got to glue my hair back in after near tearing it out.
    Reagrds
    Mark

  • Creating Detail record in Master Detail form

    I have created a Master Detail form with the Detail form being on a second page.
    I have no problem editing an existing detail record. However, if I attempt to create a new Detail record (insert). I get an error. It appears that the value of the field that I am linking the Master and Detail records with, does not get passed to the second (detail) form when I press the 'Create' button and I have not been able to ascertain where I may need to modify the parameters of the page.
    Any guidance would be appreciated.

    Hi Judy,
    It's been 5-6 months since I've created a Master/Detail APEX application, but I don't remember having to create any special trigger or anything. I created a few maintenance appls over tables I created, and created an inquiry appl using Oracle vendor tables. All of them have worked nicely.
    If the PK/FK's are set up correctly it just works. :-) Like magic. If I recall correctly, as you create the appl you define the the key fields to use. If the tables are defined correctly, and you 'tie' them together using the correct key fields in the application everything should work nicely.
    Tony

  • Can't add new detail record in Master Detail form

    Hi ,
    I've created a simple database application from scratch by initially selecting a Master Detail page. This generated a report page (for the parent ) and a form page (for the child ). On using the form to add a new child record the following error was generated:
    Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-01400: cannot insert NULL into ("STUDENT1"."DELEGATE"."DELEGATE_ID"), insert into "STUDENT1"."DELEGATE" ( "DELEGATE_ID", "CLIENT_ID", "SURNAME", "INITIALS", "SEX", "SPECIAL_NEEDS") values ( :b1, :b2, :b3, :b4, :b5, :b6)
    Error Unable to process update.
    The 'child' field listed in the error message is automatically hidden on the form and I had presumed that on generating this form using the wizard that I would have had an opportunity to link the delegate_id field to a trigger or a sequence as seems to happen when creating a database application scratch using other page types. I'm new to Apex so I'd be grateful if anyone could let me know as to why this default behaviour occurs,
    regards,
    Kevin.

    I tried it for Apex 4.0.2 (my version) and 4.1 (on apex.oracle.com) and I am asked for master and detail PK generation in both versions.
    What are your steps exactly in the wizard? Like this?
    Create page -> Form -> Master Detail Form
    Now you see a whole list of sub steps including "Primary Key Source".
    Oh I see "Create Application wizard." in your post. Start with an empty application (blank page) and use the Create Page wizard instead. Maybe that's the difference.
    Edited by: InoL on Nov 18, 2011 9:27 AM

  • Cannot delete record in master detail form in apex 4.0.1

    Dear all,
    I've created a master detail form in apex 4.0.1. Inserting and updating records is working. But when i want to delete a detail or master record, nothing is happening. The delete button is just not working.
    Can someone please tell me if this is a bug, and if so, is there a work around to solve this problem?
    Thanks,
    Diana

    Hi,
    Am I the only one having this problem?
    Thanks,
    Diana

  • Is it possible to display records without master detail relationship?

    Hi all,
    I've a form for importing excl to oracle with column mapping. i.e I've display excl column heading on the form.
    In front of each excel column heading I've provide a list item which contains table column heading so user can map his excl column with table column and according to data gets insert into the database table.
    There are 28 excel and table column headings on the form every time user will have to map the column. Its very time consuming job. That's why I've decide to provide template to user. e.g user maps the excl column with table column only first time, then this combination is saved as 'template 1' . when user runs the form next time he/she needs to just select template-1 from lov. and that template get displayed on the forms field. Then user will press the process button and data gets inserted into respective table
    Now I've created two tables
    1. mst_template
    template_name        varchar2(100) ---primary key.
    2. template
    template_name   varchar2(100) --- foreign key (ref. tempalte_name - mst_template)
    ex_col                varchar2(100)
    tb_col                varchar2(100)Now my problem is, I try the master detail relationship but it doen't works becase on my form the condition is
    excel col                                   table col
    excl_col1                                 Tab_col1
    excl_col2                                  tab_col2
    excl_col28                                Tab_col28       i've establish the master detail relationship but getting error
    FRM-40505:ORACLE error:unable to perform query. as i use excl_col1, tab_col1.. etc
    can i achieve it by using cursor? without using master detail relationship. My 90% coding is done. only thing remaining is to display records on form. so can i use cursor in this situation? and how? I've work so hard on it and lot of time is spend too so i don't want to change the coding of the existing form. any suggestion for this problem.
    please help
    Regards
    sam.

    Turning on Closed Captioning is all you can do.  I think the problem you have is that not all movies have closed captioning.

  • Insert error in master-detail form

    Probably a stupid question. When I populate the master block of
    a master detail form from an LOV, I am asked to save the form.
    Since the information is loaded from the LOV, there are no
    changes to save. If I answer yes, it gives an Insert error due
    to the primary key violation in the master block table. If I
    answer no, it opens the detail block and gives the correct
    information. The problem is that when I enter information into
    the detail block and try to save it, I get the same error
    message regarding the primary key violation in the master block.
    The form works fine if I do not populate the master block from
    the LOV (or from select statements in triggers). Any suggestions
    will be appreciated.
    LS

    Hi,
    Check for the form or block status.Looks like the status has
    changed.Thats why u r getting the message.If any of the base
    table item has changed then u will get such a message.Try
    working on this an check it out.
    Thanks
    Vinod

  • Serious problem with previous / next record in master-details relations

    I have master-details relations like this (if master is A) :
    A-B
    A-C and C-D
    When I move down with do_key('next_record') all values of all records in all blocks are OK. But when I move up, it doesn't work : all D block values are erased and I don't understand why ?
    Thank you for your help.
    Antoine LEFEBVRE.

    Blocks A and B are in the first canvas and blocks C et D are in the second canvas.
    On next_record action from A the B is updated, C too and D too. But on previous_record action, D is not updates.
    To display the second canvas I use a command button and into the WBP trigger there is :
    go_block(C);
    execute_query;
    to be sure to execute query, but it's null.
    What's your suggest ?
    Thank you,
    Antoine.

Maybe you are looking for