Master Child Table

Hi,
I am using JDeveloper 11.1.1.4 version.
In my page I have master child relation to be displayed.
I am displaying this by following the standard adf-bc master child example.
i.e add the id of the master child as partialTrigger to the child table.
But my requirement is that, multiple row selection is enabled for the master table and when multiple rows are selected in master table,
child table should not display any records.
How can I achieve this??
Also,I have a details panel displayed right under master table which displays selected row values in a form.
Here also,when multiple rows are selected,I should not display any values in the details panel.
Please advice on how to achieve this.
Thanks,
Praveen

Hi,
have a selection listener set on tabe to bean method and in bean getAllSelectedRowKeys from table. If you get more than or equal 2 entries hide the detail panel or write code so that u reresh ur detail vo to contain no rows

Similar Messages

  • Master Child tables how to get the latest rows from both

    Hi,
    Need some help with the sql. I have two tables Master & Child. In my Master table I have multiple rows for the same record and in the child table also multiple rows for the same master row how can I get the latest one's from both.
    For example Data in my Master table looks like
    CONT_ID                  SEQ_NUM        DESCRIPTION
    1                         189             Update 2
    1                         188             Update 1
    1                         187              NewNow in the child table for the same CONT_ID I may have the following rows
    CONT_ID                   UPDATED_DATE                                     STATUS
    1                        3/16/2010 2:19:01.552700 PM                          P
    1                        3/16/2010 12:29:01.552700 PM                         A
    1                        3/16/2010 12:29:01.552700 PM                         P
    1                        3/16/2010 12:19:01.552700 PM                         NIn my final query how can I get the row with seq_num 189 as it's the latest in Master table and from child table the row with status of P as it's the latest one based on the time. Here is the query i have but it returns the latest row from the child table only and basically repeats the master table rows as opposed to one row that is latest from both:
    Thanks

    Hi,
    You can use the analytic ROW_NUMKBER function to find the latest row for each cont_id in each table:
    WITH     got_m_rnum     AS
         SELECT     cont_id,     seq_num,     description
         ,     ROW_NUMBER () OVER ( PARTITION BY  cont_id
                                   ORDER BY          seq_num     DESC
                           ) AS m_rnum
         FROM    master_table
    --     WHERE     ...     -- any filtering goes here
    ,     got_c_rnum     AS
         SELECT     cont_id, updated_date,     status
         ,     ROW_NUMBER () OVER ( PARTITION BY  cont_id
                                   ORDER BY          updated_date     DESC
                           ) AS c_rnum
         FROM    child_table
    --     WHERE     ...     -- any filtering goes here
    SELECT     m.cont_id,     m.seq_num,     m.description
    ,     c.updated_date,     c.status
    FROM     got_m_rnum     m
    JOIN     got_c_rnum     c     ON     m.cont_id     = c.cont_id
                        AND     m.m_rnum     = c.c_rnum
                        AND     m.m_rnum     = 1
    ;If you'd like to post CREATE TABLE and INSERT statements for the sample data, then I could test this.
    If there happens to be a tie for the latest row (say, there are only two rows in the child_table with a certain cont_id, and both have exactly the same updated_date), then this query will arbitrarily choose one of them as the latest.

  • Get all records in multi selected master child tables

    Hi,
    I am using JDeveloper 11.1.1.4 version and using ADF-BC in my project.
    I have a simple master child[one to many] relationship in my project.
    In my view page,I display this master child [Ex: EmpVo1--->DeptVo2] as tables.
    I have multi-slection enabled for master table.
    My requirement is that,on multi selecting the rows in master tables,I want to get all the child records in my backing bean.
    that is if a master row has 3 child records and another master row has 4 child records and on multiple selection of these two records in master table,I should get all the child records in my backing bean.
    I need this to implement cascade delete functionality.
    Following is sample piece of code
    1) called on selecting the rows in master table
    public void onRSCGrpSelect(SelectionEvent selectionEvent) {
    // Add event code here...
    ADFUtil.invokeEL("#{bindings.RscGroupVO1.collectionModel.makeCurrent}",
    new Class[] { SelectionEvent.class },
    new Object[] { selectionEvent });
    RowKeySet rowKeySet = (RowKeySet)tblRSCGrp.getSelectedRowKeys();
    CollectionModel cm = (CollectionModel)tblRSCGrp.getValue();
    for (Object facesTreeRowKey : rowKeySet) {
    cm.setRowKey(facesTreeRowKey);
    JUCtrlHierNodeBinding rowData =
    (JUCtrlHierNodeBinding)cm.getRowData();
    Row row = rowData.getRow();
    System.out.println("\n" +
    row.getAttribute(0) + " :: " + row.getAttribute(1) +
    " :: " + row.getAttribute(2));
    System.out.println("Displaying Child Records");
    displayChildRecords(row.getAttribute(0));
    2. private void displayChildRecords(Object rscGrp) {
    ViewObject rscMapVo = getRscMapViewObj();
    RowSetIterator rsI = rscMapVo.createRowSetIterator(null);
    while (rsI.hasNext()) {
    Row row = rsI.next();
    System.out.println("\n" +
    row.getAttribute(0) + " :: " + row.getAttribute(1) +
    " :: " + row.getAttribute(2));
    rsI.closeRowSetIterator();
    But the problem is that ,it is always giving me the last selected rows child record details
    Please suggest the error I am doing.
    Thanks,
    Praveen

    Your problem is that you use makecurrent, which should not be used on a multi select table. Next if you have master detail relationship you should have a view link between them. In this case you can expose a method in you master to get the related child row. No need to get the VO itself as you can use the child iterator accessors to get the child record.
    public void onRSCGrpSelect(SelectionEvent selectionEvent) {
    // Add event code here...
    RowKeySet rowKeySet = (RowKeySet)tblRSCGrp.getSelectedRowKeys();
    CollectionModel cm = (CollectionModel)tblRSCGrp.getValue();
    for (Object facesTreeRowKey : rowKeySet) {
    cm.setRowKey(facesTreeRowKey);
    JUCtrlHierNodeBinding rowData =
    (JUCtrlHierNodeBinding)cm.getRowData();
    Row row = rowData.getRow();
    //cast to the right row class
    EmpEmpVoRow empRow = (EmpEmpVoRow) row;
    // now you cann access the child row iterator
    RowSetIterator it = empRow.getDepVO();
    //now you cna iterate over the child rows
    System.out.println("\n" +
    row.getAttribute(0) + " :: " + row.getAttribute(1) +
    " :: " + row.getAttribute(2));
    System.out.println("Displaying Child Records");
    //use hte child rows here
    }Not sure if the code compiles out of the box (doing this on the train :-)
    Timo

  • Child Table Cache Problem - Only in Environment

    Hi All,
    I have master-child tables in a page. Master table is based on a VO and child table is based on pl/sql EO. When user updates any child table row and hits on save, I load the same page again by releasing AM. The problem is when the page loads again after update, two records are being shown in child table. One record with old value and other record with the modified value. But in database only record exists and it is successfully updated. If we again hit "Apply" on the page then only the updated record is shown. I am sure this is due to vo/eo caches. But after insert/update, I am forwarding to same page with retain am set to false. So this should clear-off all associated caches. I had even tried to clear vo caches explicitly before redirection. But even this doesnt help. This issue exists only in the environment but cannot be reproduced locally in JDev. Its working perfectly fine in JDev.
    Any pointer on the above issue?
    Thanks in advance,
    Murari

    hmm...caching may be happening at webbean level rather than the VO level. You can confirm this by getting the value of VO.getrowcount in processRequest.
    For both Classical table as well as Advanced Table, clearcache() method is available to clear the cache of data object for inner table. Call this in processRequest. You can put in a check to call this only when you self-redirect to this page.

  • Reg:Master Child Details - AdvancedTable

    Team,
    I have a below requirement.
    1.Dept (Master Table)
    2.Emp (Child Table)
    I implemented above design in Advanced Table in Master-Child Fashion.
    Please suggest me how to implement the below requirement .
    1. I should allow the user add rows in Child Table. But For Dept(*IT*), i should render the child table as either read only or disable Add Row Button.
    2. Can we implement dependent poplist in Master-Child Table ?
    Regards
    Sridhar

    Sridhar
    I know u Discuss about Master Detail page.
    When User Select row of Master table a Event is fire we capture that event and find out That Dept name of that perticular row if Dept is IT then we Set SPEL value of Detail Table is true for Read only.
    I hope it will Help U
    Azad

  • Master-Child relations with ODP??

    I don't understand why I am having problems trying to build a simple master-child table relation with cascade delete using ODP .NET. With microsoft's providers, in the FILL command, you can specify the relationship in the fill command - Fill(dataset_name,relation_name). But in ODP .NET, it doesn't accept the relation_name as the second parameter, just the datatable. Why is that? are there any good examples out there that show working with Master-Child relations populated with Fill()? Any help would be greatly appreciated.

    bump

  • DBAT Child table Reconciliation issue

    I have the following environment
    IDM 11gR2 (11.1.2.1) Activedirectory-11.1.1.5.0, Database_App_Tables_9.1.0.5.0. Target Database Oracle 11gR2.
    I have created a DBAT connector for the Target Database that is having One Master Table and One Child table.
    The issue is that the Target reconciliation doesn’t work.
    If I run the reconciliation with a single target table it works fine (setting up a new connector for test) but if I run a reconciliation with a target that is having a child table as well it fails.
    Summry:
    Reconciliation of a target DB with Master-Child Tables is not working.

    there is an existing issue with child table recon in oim11gr2
    http://docs.oracle.com/cd/E27559_01/relnotes.1112/e35820/id_mgr.htm#CHDDGDCC
    Raise SR to oracle

  • XSQL Master Child

    Dear All,
    I need to develop the reports using XSQL. Generate the report as master child table relation wise.
    I will give sample format of my report.
    <MasterVaue>
    <child-value></childvalue>
    </mastervalue>
    i.e
    each department wise i want show the employee names
    How we can achive in XSQL in ADF
    TIA

    Hi,
    Can anyone helpout me.
    - <ROWSET>
    - <ROW num="1">
    <DEPTID>100</DEPTID>
    <EMP_ID>82</EMP_ID>
    <NAME>Ganesh</CHGVALUE>
    </ROW>
    - <ROW num="2">
    <DEPTID>100</DEPTID>
    <EMP_ID>85</EMP_ID>
    <NAME>Rajesh</CHGVALUE> </ROW>
    </ROWSET>
    - <ROW num="2">
    <DEPTID>101</DEPTID>
    <EMP_ID>81</EMP_ID>
    <NAME>Raju</CHGVALUE> </ROW>
    </ROWSET>
    Here i need <DEPTID> wise employee details
    TIA

  • Problem with Master and Child table

    Hi,
    Working in jdev 11.1.1.2.0. I have one strange issue. i have master and child tables, the model is working fine with the view link. but when drag drop the same into my jsff. when i query the result 1st time 2 tables are refershing properly and data is coming. but the when i trying to select another row in the 1st table my 2nd table(child table) is not refreshing.
    i put partial trigger of the 2nd table as 1st table id.
    can any one help wht is issue here.
    Edited by: user5802014 on Jul 15, 2010 3:44 PM

    Check this post might help you
    http://baigsorcl.blogspot.com/2010/03/creating-master-detail-form-in-adf.html

  • Filtering not working for newly added child objects in master-detail table

    Hi,
    I am using Jdeveloper 11.1.1.4 version.
    Problem scenario:
    Filtering of records is not working for newly created child objects in a master-detail scenario.
    Steps to reproduce this issue using HR Schema (using LOCATIONS and DEPARTMENTS table ) :
    1. Create Business components (EO's & VO's ) for LOCATIONS & DEPARTMENTS table)
    1. Create a .jspx page and insert a readonly master table of Locations
    2. Insert a child table (inline-edit table) of Departments and enable filtering
    4. For the child table, drag and drop CreateInsert operation as a toolbar button .
    5. Create a new child record using the toolbar button and enter data .
    6. Filtering on the newly created child record's attributes does not work.
    Please note that the same filter works for existing child records.
    Any suggestions for resolving this issue?
    Thanks,
    Vikas

    Found from Fusion Developer's Guide the following snippet about QBE functionality :
    "+When you create data controls, all data collections will automatically include a Named Criteria node with an All Queriable Attributes criteria. This is the default view criteria that includes all the searchable attributes or columns of the data collection. You cannot edit or modify this view criteria+. "
    So, the question is if the implicit view criteria cannot be edited, how else to set the query execution mode to "Both" ?
    Shouldn't ADF BC support this by default? Is this a bug?
    Note:- If you create a maste-detail table using POJO datacontrols, filter works correctly for newly created child records also .
    This seems to be an issue with ADF-BC datacontrols only.
    Thanks,
    Vikas

  • Master table unknown child tables

    Hi there!
    Suppose there is a master table having unknown child tables
    And i simply want to delete all the records of master as well as child's.
    Kind Regards!
    null

    your lov problem can be because of your form modules database interaction property. i have the same problem.in form module properties "INTERACTION MODE" must be blocking.
    Abdullah AKOGLU
    Q4) I have installed & configured the 8iAS my System is running Ok.But
    my Prob. Is that when I invoke the LOV first time it takes too much time
    it is ok however but when I invoke it again it takes too much time again.
    Is there any way to improve performance of such database etc. activities.
    null

  • How to find out master tables and concern child tables

    Hi,
    my schema contains 219 tables. I got this result by using query "selct count(*) from user_tables".
    Now i need to know about master tables and concern child tables from these 219 tables.
    please guide me.
    Thanks and Regards,
    Venkat

    What about this one!!!
    select a.owner,a.table_name,a.column_name,
         '------------------>' as POINTS_TO,b.owner,b.table_name,b.column_name
    from dba_constraints c
         join dba_cons_columns a on ( c.constraint_name = a.constraint_name and c.owner = a.owner)
         join dba_cons_columns b on ( c.r_constraint_name = b.constraint_name and c.r_owner = b.owner)
    where  (a.table_name = '&table' and (a.owner='&owner'))  -- foreign key
    --     and (b.table_name = '&table' and (b.owner='&owner') )  -- source key
         and ( c.constraint_type='R' )
    order by a.table_namecomment and uncomment one between theese two lines to choose the direction.
         (a.table_name = '&table' and (a.owner='&owner'))  -- foreign key
    --     and (b.table_name = '&table' and (b.owner='&owner') )  -- source keyBye Alessandro
    Edited by: Alessandro Rossi on 22-ott-2008 10.40

  • How to identify all the child tables referencing a master table

    Hi,
    How to identify all the child tables referencing a master table.
    Could you please help me...
    Thanks in advance...

    Hi!
    You may use this query:
    SELECT master.table_name, child.table_name
    FROM   user_constraints master, user_constraints child
    WHERE  master.table_name IN ('REGIONS')
      AND  master.constraint_name = child.r_constraint_name
    /yours sincerely
    Florian W.

  • Query ---  to find all child tables for a master table

    Suppose i have a table master .
    I want to know all tables which are child tables for this master table .
    In other words i want to know all those table names which have foreign key constraint for the master table .
    regards
    shubha

    You may want to join on the owner in case you have multiple schemas with same table names and same primary key names
    SELECT c.table_nameFROM all_constraints c, all_constraints p
    WHERE c.constraint_type = 'R'
    AND c.r_constraint_name = p.constraint_name
    AND p.constraint_type = 'P'
    AND c.owner = p.owner
    AND p.table_name = '&YOUR_MASTER_TABLE'

  • Need data in Child table based on master table

    Need help in SQL :
    I have master table name called : AA
    Data is having :
    Date Display Name
    =====================
    10/3/2009 Q3 2009
    1/3/2010 Q4 2009
    1/13/2010 Q1 2010
    4/4/2009 Q1 2009
    7/4/2009 Q2 2009
    I have Child Table
    ===============================
    ID Date Name
    =======================================
    101 10/3/2009 AAAAA
    101 1/3/2010 AAAAB
    =====================================
    Reporting purpose, I need to have data in child table for every quarter.
    Problem is : I dont have data in child table for every quarter date.
    How I want : I want to create a view, which has data of child table along with all quarters, so that I can use that view in my report.
    Data I want in view :
    ID Date Name
    =======================================
    101 10/3/2009 AAAAA
    101 1/3/2010 AAAAB
    101 1/13/2010 NOT PRESENTED ( NEW ROW)
    101 4/4/2009 NOT PRESENTED ( NEW ROW)
    101 7/4/2009 NOT PRESENTED ( NEW ROW)
    I dont want to create any procedure for this, because evey time need to run the procedure to populate data in the view / table
    Thanks in advance

    the Above question is answered perfectly,
    I got some more extension to the above query.
    Initial Question:
    Need help in SQL :
    I have master table name called : AA
    Data is having :
    Date Display Name
    =====================
    10/3/2009 Q3 2009
    1/3/2010 Q4 2009
    1/13/2010 Q1 2010
    4/4/2009 Q1 2009
    7/4/2009 Q2 2009
    I have Child Table
    ===============================
    ID Date Name
    =======================================
    101 10/3/2009 AAAAA
    101 1/3/2010 AAAAB
    =====================================
    Reporting purpose, I need to have data in child table for every quarter.
    Problem is : I dont have data in child table for every quarter date.
    How I want : I want to create a view, which has data of child table along with all quarters, so that I can use that view in my report.
    Data I want in view :
    ID Date Name
    =======================================
    101 10/3/2009 AAAAA
    101 1/3/2010 AAAAB
    101 1/13/2010 NOT PRESENTED ( NEW ROW)
    101 4/4/2009 NOT PRESENTED ( NEW ROW)
    101 7/4/2009 NOT PRESENTED ( NEW ROW)
    I dont want to create any procedure for this, because evey time need to run the procedure to populate data in the view / table
    **New Question:*  :* I have got another parent for Child for ID's : Ex : 101
    Another Parent table: AP
    =====================
    ID
    =============
    101
    102
    103
    I want to show every quarter to this ID as well Child. ( I can partition from this id, but I need some data from Child also.)
    Data I want in view :
    ID Date Name
    =======================================
    101 10/3/2009 AAAAA
    101 1/3/2010 AAAAB
    101 1/13/2010 NOT PRESENTED ( NEW ROW)
    101 4/4/2009 NOT PRESENTED ( NEW ROW)
    101 7/4/2009 NOT PRESENTED ( NEW ROW)
    102 10/3/2009 NOT PRESENTED ( NEW ROW)
    102 1/3/2010 NOT PRESENTED ( NEW ROW)
    102 1/13/2010 NOT PRESENTED ( NEW ROW)
    102 4/4/2009 NOT PRESENTED ( NEW ROW)
    102 7/4/2009 NOT PRESENTED ( NEW ROW)
    103 10/3/2009 NOT PRESENTED ( NEW ROW)
    103 1/3/2010 NOT PRESENTED ( NEW ROW)
    103 1/13/2010 NOT PRESENTED ( NEW ROW)
    103 4/4/2009 NOT PRESENTED ( NEW ROW)
    103 7/4/2009 NOT PRESENTED ( NEW ROW)
    Thanks in advance

Maybe you are looking for