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.

Similar Messages

  • New details on same page won't insert

    Hi,
    I am not able to get a master-detail-on-same-page to work properly.
    It is created with a wizard.
    After adding the first row and entering data, the row is lost when clicking Apply Changes of the master.
    The row is not inserted in the database.
    When I first add a second row without entering data, the first row is inserted when clicking Apply Changes of the master.
    Also when adding the second row, an extra Apply Changes button appears for the details.
    I am using theme '14. Modern' in APEX 3.0.1 on 10g XE.
    Any help will be welcome,
    Martijn

    Hi again,
    The same problem can be seen when following the Advanced Tutorial topic 'How to Create a Master Detail PDF Report'.
    After following the instructions you get a report with master detail form.
    When all detail rows are deleted, the Apply Changes button of the details table disappears.
    You now can add a fill in a new row. However the Apply Changes button won't save your new detail row. Though adding a next row without entering data will save the first row, and the Apply Changes button reappears.
    So, after all the job is done. However it is not the way of working we will instruct end users.
    Is their a way to get the Apply Changes reappear just after adding the first row?
    Thanks in advance,
    Martijn

  • 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.

  • Master + 2 table details on same page gives error

    first I am using jdev + jheadstart 9.0.3
    I got a master with 2 details on the same page and
    this page gives me errors. I cannot update the master or
    insert the master. The details fails too with insert and update.
    If I change the same page property of one detail all goes well.
    Is this a bug

    Edwin,
    Yes, it is. It has to do with the way checkForChanges is called. I do not have an example available of the generated code, but the generator should have generated something like:
    onSubmit = "return (checkForChanges('myForm', 'Set1') &amp;&amp; checkForChanges('myForm', 'Set2'));"
    It has been recorded as bug no 2745305.
    To fix this, you must change the page manually.
    Jan Kettenis

  • 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

  • ADF: multiple master/details on one page

    Hi forum,
    A colleague of mine has a BC4J object that needs to display a tree-like structure on a JSP. The tree is only two tuples deep, but there can be multiple children for each main node, ie something like this:
    xxx this is a 'master'
    xyyy this is a detail
    xyyy this is a detail
    zzz this is a 'master'
    zyyy this is a detail
    zyyy this is a detail
    Is there an easy way to do this by dragging/dropping the view object control unto the JSP canvas? The only thing they can seem to make work is one master with several details, not multiple masters each with several details.
    JDev 9.0.5.16.27 (can't be helped)
    tnx in advance

    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.

  • Dynamic select list display details on same page

    i have a select dropdown list that is showing products from a php msql database. When one of the products is selected from the list in need the details of that product displayed underneath the select list.
    here is what i have so far
    mysql_select_db($database_beau, $beau);
    $query_Recordset1 = "SELECT * FROM beaProdSizes, beauCat WHERE beaProdSizes.CatID = beauCat.catID";
    $Recordset1 = mysql_query($query_Recordset1, $beau) or die(mysql_error());
    $row_Recordset1 = mysql_fetch_assoc($Recordset1);
    $totalRows_Recordset1 = mysql_num_rows($Recordset1);
    ?>
    <select id="selectName" name="name">
                          <option value="Select Design">Select Design</option>
                          <?php
    do {
    ?>
                          <option value="<?php echo $row_Recordset1['name']; ?>"><?php echo $row_Recordset1['name']; ?></option>
                          <?php
    } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));
      $rows = mysql_num_rows($Recordset1);
      if($rows > 0) {
          mysql_data_seek($Recordset1, 0);
                $row_Recordset1 = mysql_fetch_assoc($Recordset1);
    ?>
                          </select>
    thanks in advance

    ok i want to make it using the php that you gave me, i have tried it but it doesnt seem to be working
    this is what i have:
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $var1_Recordset1 = "-1";
    if (isset($_GET['CatID'])) {
      $var1_Recordset1 = $_GET['CatID'];
    mysql_select_db($database_beau, $beau);
    $query_Recordset1 = "SELECT * FROM beaProdSizes, beauCat WHERE beaProdSizes.CatID = beauCat.catID";
    if (isset($_GET['catID']) && is_numeric($_GET['catID'])) {
        $query_Recordset1 .= ' AND beauCat.catID = ' . $_GET['catID'];
    $Recordset1 = mysql_query($query_Recordset1, $beau) or die(mysql_error());
    $row_Recordset1 = mysql_fetch_assoc($Recordset1);
    $totalRows_Recordset1 = mysql_num_rows($Recordset1);
    ?>
    <div class="header" id="beauTitleBOX"><?php echo $row_Recordset1['catname']; ?></div>
            <div id="beauSelectBOX">
              <form id="FormName" action="" method="get" name="FormName">
                <select id="selectName" name="name">
                  <option value="Select Design">Select Design</option>
                  <?php
    do {
    ?>
                  <option value="<?php echo $row_Recordset1['catID']; ?>"><?php echo $row_Recordset1['name']; ?></option>
                  <?php
    } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));
      $rows = mysql_num_rows($Recordset1);
      if($rows > 0) {
          mysql_data_seek($Recordset1, 0);
                $row_Recordset1 = mysql_fetch_assoc($Recordset1);
    ?>
                </select>
                <input type="submit" name="button" id="button" value="select" />
              </form>
            </div>
            <div class="header" id="beauPrice"><?php echo $row_Recordset1['price']; ?></div>
            <div class="text" id="beauOtherContent"><?php echo $row_Recordset1['desc']; ?></div>

  • 3 Page Master Detail Wizard

    Using the Create Page wizard to create a 3 Page Master Detail by selecting the "Edit detail on a separate page. Resulting pages are:-
    1. Report on Master page,
    2. Master Detail page (allows maintenance of Master row)
    3. Maintain Detail page
    However the linkage between the Master Detail and Maintain Detail pages are suspect along with the resulting Maintain Detail page.
    On Master Detail page, displaying an existing master row, the user wants to create a detail row - pressing the [Create] button for the detail does navigate to the Maintain Detail page BUT it does not pass the primary key ID value of the Master row which was displayed.
    Also when the user presses the edit details from the Master Details page then why should the displayed detail's lookup master primary key value ID updateable, if APEX is shielding the users/developers from the alleged problems of natural keys and leaning (supporting) surrogate keys then why is the detail's master key value ID updateable?
    Also is there any examples out there which show the best way to implement Master with many details and also Master > Detail And Detail of the Detail. In the tutorials we are only exposed to simple data models that only have one level of details.
    Thanks

    Hi,
    I am using the Create Page wizard, specifically the Form, Master Detail with Edit detail on separate page (as opposed to edit details on same page as master using a column report) to create a "3 Page Master Detail" as per wizard feedback.
    Take for example the table Suppliers (master) and Supplier_Contacts (details) as a simple example.
    Page 1 - Lists Suppliers as a column report on the Suppliers table with an edit icon on the P1_SUPPLIER_ID page item. Pressing edit icon will navigate to page 2 passing the P1_SUPPLIER_ID value as a parameter. Pressing the create icon will also navigate to page 2 but will not pass a P1_SUPPLIER_ID value.
    Page 2 - Supplier & Contacts (Master Detail) page, permits edit (insert, update and delete) of Suppliers (master) and also displays the Supplier_Contacts (details) rows for the supplier_id of currently displayed suppliers row. The displayed Supplier_Contracts have an edit icon that will navigate to page 3 passing the supplier_id and contact_id for the selected supplier_contacts row. Also has a create button on the detail Supplier_Contracts region which will navigate to page 3 BUT the wizard has not passed the P2_SUPPLIER_ID value as a parameter as the data model and user action dictates.
    Page 3 - Supplier Contacts (edit details on a separate page). My observation is that the Supplier_ID (foreign key to Master Suppliers table) is displayed as text item and is updateable when navigated from page 2 as an edit details transaction/event. Why on earth allow a user to select and navigate the Supplier and then the Contact to edit and then allow the user to update the master foreign key? Similarly if the user has selected and navigated to the Supplier (master) to which they wish to add a Supplier Contact (detail) why is the supplier_id (master PK ID) not passed to the edit details page and the supplier_id also non-updateable.
    Hope this explains it a bit better.

  • Cant See Master Detail Option in context menu.

    While doing this Tutorial
    http://www.oracle.com/technology/products/jdev/101/tutorials/e2ebcfaces/buildmaster-detailpagewithjdevandadfbc.htm
    Creating a Master-Detail JavaServer Faces Page
    12. Drag OrdersView2 to the visual editor.
    JDeveloper opens a context menu with the available options for that data control.
    I Cant See Master Detail Option in context menu.
    Can Any one help.

    Hi,
    I am facing the same problem.
    I cant see the item in the popup context menu like here:
    [Web Dynpro ABAP and eCatt Testing |https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/media/uuid/e3b19f11-0a01-0010-409d-b3951f754963]

  • Master Detail performance problem

    I have a demo master detail application which was built using the Application Express Wizard (APEX v3.2) which is performing badly under a particular situation.
    The master detail is a workers table (46000 rows, pk index on id) and a licence table (48000 rows, fk index on wkr_id)
    The generated application opens with a multi row report from a workers table. Clicking on the edit button on a worker record takes you to a master detail page which is the worker record and one or more licence records.
    If the report page is run and you click the edit button to go to the master detail page, then you click on the next and previous records buttons the performance is fast - around 0.3 seconds.
    However if you use a search term in the report page to find workers by name. The report page renders quite fast but then clicking on the edit button to go to the master detail worker record page is slow - around 5.5 seconds at best. This scales badly too. Clicking next and previous buttons at this point is similarly very slow.
    4 sql statements are appearing in V$SQLAREA when the next button is clicked as follows:
    1. SELECT "ID", LEAD("ID",1) over (order by "ID") next, LAG("ID",1) over (order by "ID") prev
    FROM "PROD"."WORKERS"
    2. SELECT "ID","LIC_ID","SURNAME", "FIRST_NAME","OTHER_NAME",
    FROM "PROD"."WORKERS" WHERE "ID" = :B1 FOR UPDATE;
    3. SELECT "ID","LIC_ID","SURNAME", "FIRST_NAME","OTHER_NAME",
    FROM "PROD"."WORKERS" WHERE "ID" = :B1;
    4. SELECT NULL "CHECK$01", "ID" "ID", "WKR_ID" "WKR_ID", "LIC_NO" "LIC_NO", "ISSUING_STATE" "ISSUING_STATE"
    FROM ( SELECT /*+(WORKER_LICENCES eli_wli_wkr_fk) */
    "ID", "WKR_ID", "LIC_NO", "ISSUING_STATE"
    FROM "PROD"."WORKER_LICENCES"
    WHERE "WKR_ID" = :P2_ID)
    These queries run like lightning when executed directly on the database and are as generated by the APEX wizard.
    The same application generated in Oracle Forms 10 on the same database is super fast (< 0.2 seconds.)
    Can anyone advise where the problem may lie.
    Thanks
    Phil Gray
    Edited by: graypz on Aug 18, 2009 6:50 PM

    Thanks for that Andy
    This got me to thinking. The number of columns that I have shown is pruned down drastically from the actual 50 columns in the table - which would make indexing out of the question.
    The classic presentation of the home page of the generated application allows a search field which does searching in any column for a search term :P1_REPORT_SEARCH. The region source query has a monster "where clause" to cater for that, something like this:
    where (
    instr(upper("LIC_ID"),upper(nvl(:P1_REPORT_SEARCH,"LIC_ID"))) > 0 or
    instr(upper("SURNAME"),upper(nvl(:P1_REPORT_SEARCH,"SURNAME"))) > 0 or
    instr(upper("FIRST_NAME"),upper(nvl(:P1_REPORT_SEARCH,"FIRST_NAME"))) > 0 ... etc for the whole 50 columns
    Sure enough, when I run that query direct in the database it performs badly - around 4.5 seconds.
    My first cut of a workaround is to restrict the columns that can be searched to those with an index (LIC_ID, SURNAME) and to remove the rest of the generated where clause. Then to edit the P1_REPORT_SEARCH label to say "Search for Lic Id or Surname".
    This brings about an immediate sudden increase in speed of the query.
    The next part is still unresolved. The master detail form "next" "previous" buttons do not perform too well - and the records are not in context of the search that was run on the home page. My workaround is to remove the buttons as I don't have enough knowledge to attack that yet.
    I may be expecting too much of the APEX wizard, but hopefully someone can direct me to a way of resolving this.
    Regards
    Phil Gray

  • How to have both Classic Report and Interactive Report from the same page?

    Hello APEX developers,
    I want to copy a page consisting of master-detail form together with its data, as in data stored in the tables.
    I've generated a master-detail form(which by default having its detail report as a classic report). I want to copy this page and then migrate this classic report to Interactive Report. This way, I have both the classic master-detail form with report AND the master-detail Interactive Report.
    I've tried doing this but ended up getting a new master-detail Interactive Report page without its data.
    Any feedback is appreciated.
    Best regards,
    Daniel

    Hi everyone,
    Solved already. What a relief! Kindly ignore this post.
    Rgds,
    Daniel

  • Master Detail FK Problem

    I have created a Master/Detail set of pages. Using just the wizard. This is the option that creates 3 pages:
    1-Master Page
    2-Master Page detail, show a summary of the detail page
    3-Form for detail
    The data is being added to the database but the Master Page foreign key (master table fk) is not populating at all. I can see the data in the table, but the FK that points back to the Master table is blank.
    Having a real problem with this, please advise.

    Steve,
    Firstly, good luck for Gustav, keep your head down and hope it doesn't hit too hard. I was just in New Orleans for ODTUG and obviously would hate to see you guys go through something like that again.
    Secondly, I was just looking through the patch notes for Apex 3.1.2, and spotted these bugs had been fixed -
    6999393 - Master Detail Wizard creates processes with incorrect sequence
    7013435 - MRU process in Create Application Wizard-generated master detail not working correctly
    7016267 - 3 page Master Detail should not allow edit of Foreign Key Field on Detail PageI'm not sure if any of them directly related to your problem, but it could be worth looking them up in Metalink (those are the Bug numbers) to see if they are, or alternatively do the upgrade and see if it fixes your problem.
    John.
    http://jes.blogs.shellprompt.net
    http://www.apex-evangelists.com

  • Master and detail in the same page

    db11xe , apex 4.0 , firefox 24 ,
    hi all ,
    i am trying to insert the master and detail data in one step in the same page :
    i have two tables (clients) and (tests_administered)
    the client table's region contains theses items
    client_id
    client_name
    the other table's region contains these columns -- the tabular region
    row selector
    test_admin_id -- pk,  hidden
    client_id          -- hidden , this is the one i should populate with values
    and more columns
    i've done this :
    1- removed the condition of the tabular region .
    2- Added the request CREATE to the list in condition of the APPLYMRU process -- or :request like ('CREATE')
    3- Added new process with following code : -- with sequence before the applymru process and after process row of clients process
    for i in 1..apex_application.g_f02.count
    loop
    apex_application.g_f02(i) := :p2_client_id ;
    end loop ;
    but nothing happened . why ? what did i miss ?
    thanks

    Hi,
    Create a Master Detail Form through the APEX Wizard 
    Make sure you choose the Primary Keys for the Master Detail as one of your Column and not the ROW ID.
    Selecting an existing Sequence for the Primary Key is preferred.
    Select the option the where your Master and Detail appears in the same page.
    Initially when you run the page your master and detail will not appear at the same time in the page when your Master Detail Form is in the entry form mode. For this you have to go to your Tabular Form(Detail Form) region, and below you will have to remove the Condition for the display of your Tabular form and set it to “No Condition”.
    Now when you run the page both the Master and Detail form will appear together in the create mode but you will not be able to insert or create both master and detail records at the same time when u click the create button. For this the following needs to be done: You need to create a PL SQL Tabular Form process :
    Let's say your master form is based on DEPT and your detail tabular form is based on EMP. Make sure the following things are configured:
    The DEPT insert/update DML process runs before the new tabular form PLSQL process. (ie) the new PL SQL Tabular Form Process that you create should be inbetween Automatic Row Processing(DML) and Multi Row Update Process , so create the new Tabular Form Pl SQL process with a sequence number inbetween these two Processes.
    Make sure you choose Tabular form while creating this PL SQL process.
    The new tabular form PL/SQL process executes the following as the source
       :DEPTNO := :P1_DEPTNO;
    Where DEPTNO is the Foreign Key column in the Tabular Form that links the Primary Key Item P1_DEPTNO of the Master Form.
    Finally this new PL SQL process conditionally runs when DEPTNO is null, so you need to add the following condition to the process:
    The final step to accomplish in creating both the Master and Detail records at the same time is to make a change in the condition of the Multi Row Update Process. :request in ('SAVE','CREATE') or :request like 'GET_NEXT%' or :request like 'GET_PREV%'
    -We make this change so that records get inserted into the Detail table when we click the ‘’Create” button.
    Now you can Run your page and create both the Master and Detail records at the same time.
    Thanks and Regards,
    Madonna

  • 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

  • To create an application with a master and two details in the same page

    How I make to create an application contend a form master with two forms details in the same page?
    Tomaz
    Message was edited by:
    user517841

    Hi,
    You do not need to mount a screen. Just add a new region with several text fields inside. You should fetch a row by a process and populate the set when you load the page or click on a button. Insert, update, and delete should be done by processes. You have to have Next and Previous buttons to brows trough all rows of the detail table.
    The most important thing here is what the connections between tables in your database are.
    If they are the "One to many, One to one" you can use the approach described above.
    If they are "One to many, One to many" will be better to use buttons or links to lunch details' tables in separate forms.
    If the second and third tables are connected only to the master table you can use two buttons at the right of every master row. Clicking on the buttons will bring separate form for each detail table.
    If the third table is just a luckup table to the second one you can use "Select List" field into tabular form of the second table in one Master-Detail form.
    Konstantin
    [email protected]

Maybe you are looking for

  • Report to know status of Comm Channels

    Hi, My client has a new requirement where they want to develop a ABAP report through which they will be able to know the current status of the PI communication channels . Means executing this report they will get a list of the channels will the statu

  • How can I find when I loaded Maverick? I want to uninstall.

    How can I find when I loaded Maverick?  I want to uninstall it, but I want to go back to before I installed it for Time Machine.

  • My sony DCR-SR68 will not connect, stuck on "preparing"

    I have tried to connect my sony DCR-SR68 via USB cable, the camera displays proper screen (to choose USB connection for the internal HD), I choose the USB connect, then the screen stays stuck on "preparing." It's supposed to be communicating with the

  • Combining variables in a query

    We have been using this query to search for contacts by one part of their address.  I have found that it will miss some results.  If I search on a city and leave zip and county blank I should get all the results for that city regardless of whether th

  • Synchronous Messages persistence in XI

    hi Can someone guide me through the steps require for monitoring Synchronous Messages persistence in XI? I believe we need to swtche on logging in XI.