Master detail relation in the ADF Jdev10g sample application

Hi,
I have to develop Master detail relation in the ADF Jdev10g. Need sample application...Can anybody help me..

Lots and lots of tutorials [url http://www.oracle.com/technetwork/developer-tools/jdev/overview/index-100269.html]here
Note: 11g has been out for some time now, and if you are doing new development, it really makes sense to be using the latest software. If, by chance, you happen to be talking about doing development for the E-Business Suite, you want to be asking on the OA Framework forum.
John

Similar Messages

  • Master detail relation in the sql report

    HI All
    I am using Oracle 10g and have a requirement where I need to generate the output in the following format
    Deptno 10
    Empno Ename
    1 ----------A
    2 ----------B
    Deptno 20
    Empno Ename
    3-----------C
    4-----------D
    5-----------E
    Deptno 30
    Empno Ename
    6-----------F
    7-----------G
    Can we do it throgh sql report in sqlplus.
    Thanks
    Edited by: user602329 on Sep 15, 2010 10:18 PM

    Hi,
    In pure SQL, you can get results like that using GROUP BY ROLLUP, and also using UNION. In this case, I suspect UNION would be a lot simpler.
    Using SQL*Plus fucntionality, you could also write a SQL-from-SQL script that writes (and runs) a separate query for each department, the output of which is exactly what you requested.
    I'd try UNION first.
    Write one query to get the rows like
    Deptno 10from your table, using GROUP BY deptno.
    Write another query to get the rows like:
    Empno Enamefrom your table, using GROUP BY deptno to get one such row per department. (It's possible to combine these two queries, but simpler not to.)
    Write another query to get the actual data, such as
    EMPNO  ENAME
    =====  =====
    1      A
    2      B
    3      C
    4      D
    5      E
    6      F
    7      GThen do a UNION of all three queries, with an ORDER BY clause to get them in the right order.
    Each branch of the UNION will need some extra columns, to make the sorting work right. That is, the result set of the UNION will look something like this:
    OUT1   OUT2        EMPNO     DEPTNO     QUERYNO
    Deptno 10               10     1          
    Deptno 20                   20     1
    Deptno 30                   30     1
    EMPNO  ENAME               10     2
    EMPNO  ENAME               10     2
    EMPNO  ENAME               10     2
    1      A        1          10     3
    2      B        2          10     3
    3      C        3          10     3
    4      D        4          10     3
    5      E        5          10     3
    6      F        6          10     3
    7      G        7          10     3If you're going to have text, like 'EMPNO' in the 1st column, but empno is a NUMBER, then you should convert the NUMBERs to VARCAHR2s, using TO_CHAR.
    You probably won't want to display those extra columns, so use the SQL*Plus "COLUMN ... NOPRINT" command to hide them, or do the UNION in a sub-query, and then do the ORDER BY in a super-query, where you can use columns in the ORDER BY clause without putting them in the SELECT clause alsio.
    Edited by: Frank Kulash on Sep 16, 2010 11:02 AM

  • Need Master-Detail relation to link Master column to 2 different detail col

    I have a form with a master detail relation. The master block is a database table rec_shipments with a primary key of shipment_id and a bunch of other columns. The detail block is a table rec_containers with a container_id as the primary key plus column shipment_id, split_shipment_id, weight, volume, etc. The shipment_id and split_shipment_id are nullable.
    When a shipment is received a shipment record is created and container records are created with the shipment_id populated and the split_shipment_id null. In the form a relation was created between the shipment block and the container block as shipment_id=shipment_id. This works fine. However, they have the ability to spit the original containers into smaller more manageable containers for distribution. For example if they receive a railroad car full of pallets of printer paper they may take and divide them, half into 1 rolloff bin and half into another rolloff bin. The rolloff bins will get a unique container_id for tracking. The record in the system created in the rec_containers table will have the split_shipment_id populated and the shipment_id null. In the screen they want to see the original containers (railroad car) and the split containers (rolloff bins) when the query the shipment.
    What they want:
    Shipment_id -- and additional information
    Railroad Car ID plus additional information
    Rolloff Bin 1 ID plus additional information
    Rolloff Bin 2 ID plus additional information
    My problem is the rolloff bins don't show up with the current relation because the shipment_id is null in the 2 rolloff bin records.
    I've tried creating a view on the rec_containers table that is all the columns in the table plus 1 additional column that is
    nvl(shipment_id,split_shipment_id) comp_ship_id
    and set the relation to shipment_id=comp_shipment_id. I set the comp_shipment_id column to query yes and insert & update to no because I don't want to update that column in the view.
    The problem is I can't update any columns, I get a can't reserve record for update or delete error.
    Does anyone have any ideas how I can get the containers block to query all records where the shipment_id or split_shipment_id matches the shipment block shipment_id and still be able to update the records?
    Thanks for any help.

    Your idea of using a view is the best approach. In order to make the block updateable, you have to sst the property "Query only" for your derived item to "Yes". Witn this, the column will not be included in any further dml. About the locking... it may be that forms isn't anymore able to do proper locking when a block is based on a view. In that case, put an ON-LOCK-trigger on the block and lock the record by yourself doing y SELECT FOR UPDATE NOWAIT on the record. To just try if this would work you use a NULL in the ON-LOCK just to xheck if the dml-operations itself will work. if your view is based on only one table you have good chances that there is nothing to change, if you get an error like "View not updateable", you have to do some further adjustments
    -Set the key-Mode for the block to "Non-updateable"
    -Set the property "Primary key" to "Yes" for the pk-item in your block.
    hope this helps

  • Issue with Master Detail relation in OAF page -- Help

    Hi,
    I am developing an OA page with a master detail relation. The detail records are displayed in the subtab region.
    The issue that I am facing is as follows:
    If there are 2 detail records in the detail table, then my page is displaying these 2 records twice i.e.
    Detail Records:
    Header Id Line Id
    2 1
    3 1
    Header Id Line Id
    2 1
    3 1
    If the number of detail record increases, then again the display also increases that many times i.e. 3 records gets displayed thrice.
    Kindly help to figure out the issue.
    Thanks In Advance.

    Hi,
    Take the following actions.
    1. Try to display your records in simple Table and remove it from subtab,
    2. check relations as well, you can delete and re-create all the relations with EOs and VOs and recreate them.
    3. Also check when your VO get popluated that how many rows are there in Detail VO ?
    For example.
    int x = yourViewObject.getRowCount();
    System.out.println("Number of rows in detail view Object"+x);
    Haroon.

  • Master - Detail relation succeded and the failed!!

    Hi all,
    I've made a master-detail relation between two data block using data block wizard with (copy value from item) property, this worked successfully for times and failed a lot of times!
    when I insert a record at the master data block the value is copied at the detail data block, but when I did the same thing for another time the value didn't copy!!
    to solve this problem I made a trigger at the detail data block (pre insert):
    :Master.Item-Value := :Detail.Item-Value
    this one succeded for the first time and then it failed!!
    I don't know what is the problem
    Note:
    I connected to a database server on another PC and work and save my forms at this PC.
    Edited by: Dev. Musbah on Oct 5, 2008 3:54 AM

    One about the important note:
    Thats exactly the missing point.
    If you assign the PK-value by a database-trigger, you have to read it back into forms after the insert.
    Three possibilities:
    1. There is a property at block level like "DML returning clause" If set to "Yes", forms will read back all values from the db after insert or update.
    2. Write an POST-INSERT-trigger at block-level and read back the ID by yourself using a cursor.
    3. Assign the PK-value already in the form in a PRE-INSERT-trigger and populate the PK-column in the database-trigger only if the pk-column is null
    hope this helps.

  • Creating a master-detail relation between a view and a table

    Hi all,
    I have a problem with creating a master-detail relation between a database-view with lots of customer data and a small table with per customer a list of entities of our companies who may work for that customer.
    Somehow I seem to be unable to create a relation between these two. I can't find where I can make a foreign key using Toplink to implement the relationship. And neither can I get a Viewlink object doing the job using ADF Business Components.
    Somebody any suggestions on this problems?
    Regards,
    Birgit

    There is a key relationship between two fields which form the primary key in the main table of the view and two fields in the second table.
    I created a viewlink manually, but I still couldn't get the data correct i.e. a form with one record of a customer from the main view and a small table with all entities of our company who can make performances for that customer.
    I tried to find a manual or a how-to on this topic but I didn't find anything helpfull yet.
    Regards,
    Birgit
    After a couple more tries, I got the master-detail working. With all the fiddling I am not sure what caused the problem but I think the finally action was checking which fields of the view were marked as primary keys.
    Now everthing is up and running.
    Birgit
    Message was edited by:
    user492355

  • About master detail relation ship between tables

    Hi
    I am using jdev 11.1.1.5.0
    Use case:
    I have 2 table having master-detail relationship
    master table - req_hdr
    detail table - req_file
    req_hdr is drop as adf table (t1) on a fragment page and req_file is drop on popup as adf table (t2).
    user can add any no of row in req_file with respect to each row of req_hdr.
    to open popup for req_file, a command image link is provided in one column of req_hdr.
    On popup, there is two button provided for save and close.
    On save button,commit operation is performed and on close button,rollback operation and popup.hide() is performed.
    Now the problem what I am facing is
    1. If with respect to any row of req_hdr there is one row already exist in req_file and user click on add button to add new row in req_file and randomly user decide to to close the popup rollback operation is performed and again when user click on same row to open popup.
    Popup contains no row while in database there is one row exist for that.
    2. if user add a new row in req_file and perform save( commit ) and again for next row of req_hdr user open a popup to add new row in req_file and click on add button ,values of preceding row is already populated in new row while is should be empty because req_hdr and req_file have master detail relation and for next id of req_hdr, req_file should display new row.
    Anyone have the solution regarding this....?
    Thanks..

    the contentDelivery for the popup is already set to lazyUncached
    and on add button i use following code to add new row:--
    <code>
    Row r_file=null;
    CollectionModel tableModel = (CollectionModel)getT2().getValue();
    JUCtrlHierBinding adfModel = (JUCtrlHierBinding)tableModel.getWrappedData();
    DCIteratorBinding dciter = adfModel.getDCIteratorBinding();
    NavigatableRowIterator nav=dciter.getNavigatableRowIterator();
    r_file=nav.createRow();
    r_file.setNewRowState(Row.STATUS_INITIALIZED);
    Row lastRow=nav.last();
    int r_index=nav.getRangeIndexOf(lastRow);
    nav.insertRowAtRangeIndex(r_index+1, r_file);
    dciter.setCurrentRowWithKey(r_file.getKey().toStringFormat(true));
    r_file.setAttribute("Sno", vo_file.getEstimatedRowCount());
    r_file.setAttribute("Filetype", null);
    r_file.setAttribute("Filename", null);
    r_file.setAttribute("Remark", null);
    </code>
    There is any help regarding this....?

  • Help on Master Detail relation

    Im using XSQL command line processor 1.0.2.0.
    How I can I write a SQL query To display master detil relation in the output?
    For example Department and Emp are two different tables with master detail relation...
    I just want to display the output some thing like..
    <Department>
    <Details>
    <Dep_name>Accounts</Dep_name>
    <Dep_no>10</Dep_no>
    <EMP>
    <EMP_NAME>AAAAAA</EMP_NAME>
    <EMP_NO>999999999</EMP_NO>
    <HRD>01/01/2000</HRD>
    </EMP>
    <EMP>
    <EMP_NAME>BBBBBB</EMP_NAME>
    <EMP_NO>100000000</EMP_NO>
    <HRD>01/01/2000</HRD>
    </EMP>
    </Details>
    <Details>
    <Dep_name>INVENTORY</Dep_name>
    <Dep_no>20</Dep_no>
    <EMP>
    <EMP_NAME>CCCCCCC</EMP_NAME>
    <EMP_NO>8888888888</EMP_NO>
    <HRD>01/01/2000</HRD>
    </EMP>
    <EMP>
    <EMP_NAME>BBBBBB</EMP_NAME>
    <EMP_NO>100000000</EMP_NO>
    <HRD>01/01/2000</HRD>
    </EMP>
    </Details>
    </Department>

    [list]
    [*]First, I'd recommend upgrading to XSQL 1.0.4.3, the latest production release that is part of the XDK for Java 8.1.7.1 at http://otn.oracle.com/tech/xml
    [*]Then, explore using the Oracle CURSOR() expression to create nested rowsets. This is documented in our SQL language reference info here on OTN. My book has several examples of using CURSOR() to produce master/detail results, too.
    [list]
    Steve Muench
    Development Lead, Oracle XSQL Pages Framework
    Lead Product Manager for BC4J and Lead XML Evangelist, Oracle Corp
    Author, Building Oracle XML Applications
    null

  • Master Detail Screen in Oracle ADF 11g

    Hi Gurus,
    I am facing an issue with the master detail page. The page is meant for entring master detial information. The page has two view objects based on entity objects which are based upon the master and detail tables.
    I am using the Jdeveloper version 11.1.2.3.0 ( Jdeveloper 11g release 2). on Windows 7 on the embedded weblogic server ( included in the jdeveloper).
    Structure of Master and Detail Table are
    Master (pk1,attr1,attr2);
    Detail (pk1,pk2,attr1,attr2);
    The detail table is having a composite primary key in which pk1 is a foreign key and pk2 is incremented for each pk1, hence the value is like (1,1), (1,2),(1,3) ... etc.
    Now i have created a create insert operation in the page from the detail view object. And for generating the new pk2 value in the detail row i have written the logic in the doDML() method of the detail entity object.
        protected void doDML(int operation, TransactionEvent e) {
            System.out.println(operation);
            if (operation == DML_INSERT) {
                    DBTransaction trans = getDBTransaction();
                    String sql = "select max(nvl(pk2,0))+1 from xyz_detail where pk1="+this.getPk1().toString();
                    System.out.println(sql);
                    PreparedStatement pstmt =trans.createPreparedStatement(sql,0);
                    try{
                    ResultSet rs = pstmt.executeQuery();
                        rs.next();
                        System.out.println(rs.getString(1));
                        this.setPk2(rs.getString(1));
                        rs.close();
                    } catch (SQLException excp){
                            this.setPk2("Error");
                            System.out.println("Inside exception");
                        excp.printStackTrace();
            super.doDML(operation, e);
        }Now , when i am creating a single record and commiting the transaction the value of the pk2 in detail is generated and saved properly, how ever when i am generating multiple rows at once and then commitng the transaction noting is being done, neither the value of pk2 is being generated nor the rows afre commited please guide me accordingly.
    May be the answer of this question be in the behaviour of DBTransation , i am creating multiple rows and the calling the #{bindings.commit.execute} , what is the behaviuor of this commit, i think it should commit all the uncommited work, and apart from this as the logic is written in the doDML() method it must fire for every row of data created in detail once.
    Please Guide me accordingly.

    Hi,
    try these ways: override a create method in the Entity or use a groovy expression for default value of the attribute
    this post uses a sequence but it's the same
    http://one-size-doesnt-fit-all.blogspot.com.es/2009/03/adf-bc-using-groovy-to-fetch-sequence.html

  • Multiple Master Detail Relation In Forms 6i

    I have tables as below
    1.Bill_Head
    Bill_No
    Bill_Date
    Fin_Year_Cd
    Remarks
    2.Bill_Tail
    Bill_No
    Product_Cd
    Amount
    Ded_Amount
    Net_Amount
    3.Bill_Tail_Det
    Bill_No
    Product_Cd
    Quantity
    Rate
    Interest_Percent
    Service_Charge
    Vat_Tax_Percent
    The Relation is like
    Between BILL_HEAD and BILL_TAIL is Master Details Relation
    Between BILL_TAIL and BILL_TAIL_DET is one to one relation
    In single form i am not able to insert record.
    If i build Master details between BILL_HEAD and BILL_TAIL, BILL_TAIL and BILL_TAIL_DET, when i run the for to insert data.
    I will put the data for BILL_HEAD data
    For this parent record there will be child record in BILL_TAIL block.
    For this BILL_TAIL parent record there may be a child record in BILL_TAIL_DET or may not. Suppose i put a child in BILL_TAIL_DET.
    Then i wanted put one more child record in BILL_TAIL block, if i say next record, it is asking me to "save the record first".
    Please help me in this regards
    my mail id : [email protected]
    Regards
    Mahaveer
    Message was edited by:
    user603318

    Thanks Kris, for your reply.
    Is there any way out to enter all the data at once and then commit, b'cse for every record asking to commit is tedius.
    Regards
    Mahaveer

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

  • Master-Detail Relation- Detail records not displaying

    Hi All,
    I am working forms(10g) customization for an oracle applications. our requirement is to develop a new window(screen) which should display all the related child records for the master record in the main form on a button press.
    i have developed a new database block based on a vew and provided the relation with master block, and done the required customization.
    But, when i run the form, and clicked on button, it is giving an error
    FRM-40350 Query caused no records to be retrieved.below is the code that i have written on button click
    BEGIN
              IF event = 'WHEN-BUTTON-PRESSED'
              THEN
              SHOW_VIEW('XXSCP_GBL_CUST_PEGGING_CON');
              SHOW_VIEW('XXSCP_GBL_CUST_PEGGING_STK');
              app_window.set_window_position('XXSCP_GBL_CUST_PEGGING_WIN',
                                             'CASCADE',
                                             'XXSCP_GBL_EXCEP_DETAILS_WIN');
          SET_BLOCK_PROPERTY('XXSCP_GBL_EXP_DETAIL_V',NEXT_NAVIGATION_BLOCK,'XXSCP_GBL_CUST_PEG_V');                                        
          GO_BLOCK('XXSCP_GBL_CUST_PEG_V');
         -- fnd_message.DEBUG('before execute');
          EXECUTE_QUERY;
          :parameter.p_excep_detail := 'FALSE';
              ELSE
                   NULL;
              END IF;
              EXCEPTION
                   WHEN OTHERS
                   THEN
                   fnd_message.DEBUG('other error at button press'||SQLERRM);
              --     NULL;
    END;I am able to query records in my view from database, but not working when i run the form.
    ANy suggestion will be helpful.
    Thanks in advance,
    pavan

    Duplicate post -- Re: Master-Detail Relation- Detail records not displaying

  • Master Detail Relation

    Can I design Master detail using one block for master and display like 5 records and each of this has 10 detail records. I am not sure if I can achieve this.
    Other scenario is have one master block(5 records) and have 5 detail blocks. Please give any information related

    Husna,
    1. To only show 5 reords in teh master block, just set the display record property to 5 (records displayed). Selecting one of teh master records queries the detail records (as many as there are available)
    2. Master/Detail navigation works only for the current selected master record. i get th eimpression that you want to show all detail records that belong to the five master records currently visible. If this is the case then I would'nt use a master-detail relation in Forms, but read the PK from the block record and set it as the where clause to one of the detail blocks.
    Frank

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

    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 the form.
    This problem happens only when I iterate in the master view and I try to add a record in the detail form.
    If I add a new record without navigation for the master view there is no problem.

    Jode,
    which technology are you using, ADF JClient ? If yes, please provide a step by step description of how to setup a testcase to reproduce the problem.
    Frank

  • Master-Details Relation

    Hi All,
    I Have one dought,I have a form with master-detail relation.
    If i query in header level i can able to see all the data in both levels.
    If i query in detail level i cannot see header level information,but i can able to see the detail level only.
    Can any help me in this
    Regards
    Siva

    Remove join condition and relation as well! In master block you should have in where close "database_item = :bl_2.item" and in detail block you should have where close with "database_item = :bl_1.item". When user put the cursor in bl_1 and execute query the bl_2 should be listed as well. You can do this on different way for ex.: write in key-exeqry or when-new-record-instance etc. on bl_1 go_block('bl_2'); execute_query; And inversely or "vice versa": when user put the cursor in bl_2 and execute query the bl_1 should be listed as well. You can do this on the same way for ex.: write in key-exeqry on bl_2 go_block('bl_1'); execute_query;
    If you want to create record you have to be carefuly on the key items in both blocks. So you have to fill the key item before user want to do the commit form. That's all but I did not test it so I can not know how could both where condition behave with different users action.

Maybe you are looking for

  • ACS 5.3 Group Mapping based on AD group membership

    Hi, I am configuring a new ACS 5.3 system. Part of the rules is that I want to match the users specific AD group membership, and match appropriatly to an identity group. What i'm trying to do is say that if the user is a member of the AD Group (G-CRP

  • How to change the submit form data - standard e-mail text?

    everytime, when submitting data of a form, in the e-mail appears a standard text like below: The attached file contains data that was entered into a form. It is not the form itself. The recipient of this data file should save it locally with a unique

  • Script for Portfolio PDF files

    Hi, I have a portfolio with several PDF XFA forms inside. I want to set up a button so that when the user clicks it the PDF will open in a new window (outside of the portfolio); Need help here! lock some of the fields; Have this done with .access = "

  • CR: Hide context menu on download page?

    Hi, business needs require, that we publish some documents via the collaboration room in the SAP Enterprise Portal. Only registered members to the room should have the possibility to download documents, additional rigths for members must not be possi

  • My headphone is stuck in the jack of my Mac Pro how can i take headphone mode off

    my headphone is stuck in the headphone jack of my mac pro, how can i take it off headphone mode