Parent child synchronization using a component of the iterator

Hi all

I'm working on ADF 11.1.1.5.0. I have the following corporate bond:

I have DepartmentVO and EmployeeVO with a link to view defined on the attribute DepartmentId.

Use case: I need all the departments with their respective childs, a specific user interface design that is I need to show all departments as Panel boxes and their respective children inside the box on display.
So for this I used the iterator component which will create dynamically group boxes based on the number of lines of DepartmentVO. (if there are 5 documents in boxes of Panel for the table then 5 dept will be trained).
Similarly, for child, I used another component of iterator (inside the parent iterator) that can display its respective children.

JSPX code is as follows:

< af:panelGroupLayout id = "pgl1" layout = "scroll" >
< af:iterator id = "i2" value = "#{bindings." DepartmentsView1.collectionModel}.
var = 'row' >
< af:panelBox text = ' #{rank. " DepartmentId}-#{rank. DepartmentName}"id ="pb1"styleClass ="AFStretchWidth">

< af:panelGroupLayout id = "pgl3" >
< af:iterator id = "i1" value = "#{bindings." EmployeesView3.collectionModel}.
var = 'attr' >
< af:outputText value = "#{attr.". DepartmentId}"id ="ot1"/ >
< af:outputText value = "#{attr.". First name}"id ="outputText1"/ >
< af:outputText value = "#{attr.". LastName}"id ="outputText2"/ >
< / af:iterator >
< / af:panelGroupLayout >
< / af:panelBox >
< / af:iterator >
< / af:panelGroupLayout >

When I run the page I see all parent records as boxes of Panel but the child records are properly synchronized. The children of the first parent is repeats inside all parents. This is probably the first parent is defined as the current line for which her children is repeated in all the other parents.
If I run the same through AppModule, it works perfectly as in appmodule run us hv a button NEXT to iterate the VO Parent.


Thnks
-Maryvonne

Hello
Instead of what you've tried, you can try this. EmployeesView here should be present as a child accessor in DepartmentsView.


value = "#{bindings." DepartmentsView1.collectionModel}.
var = 'row' >

ID = "pb1" styleClass = "AFStretchWidth" >










Hope this answers your question.

Thank you
TJ

Tags: Java

Similar Questions

  • Switch the setting to a page of the window parent child and store session values in the parent window

    Hello

    I have two pages of the apex. I open a page of the child using javascript in the parent page.

    Parent window has the following articles.  P1_Text1, P1_text2, P1_text3. The setting is 'Change only when the session state is null', static assignment.

    In the child window: I have two buttons 'Confirm' and 'close '.

    When I press "confirm", it sets the value of a page element parent in a process of PL/SQL.

    BEGIN

    / * some calculations

    followed by an assignment statement * /.

    : P1_Text1: = final_value;

    END;

    "Close" button in the child window. as a result of javascript that are associated with:

    JavaScript:

    Window.opener.Location.href = window.opener.location.href;

    Window.Close ();


    When I press the close button, the parent window gets updated and P1_Text1 is responsible for the requirements.  Everything is going well so far.


    But the problem is with other elements of the parent page. They become null.


    How to store the values of the elements of the page of the parent window?



    Kind regards

    Archana








    archana2 wrote:

    But the problem is with other elements of the parent page. They become null.

    How to store the values of the elements of the page of the parent window?

    Problem: You're not 'save' the other page elements.

    Solution: Before you open the child window, you need to "introduce" the values desired registered on the server.

    This is best done with a dynamic Action that uses a PL/SQL code block.  The key is to include all the items you want to store the property in the "Page" referred to submit

    PL/SQL code is a code simple no - ops

    begin
      null;
    end;
    

    For you, it seems that the 'child window open"should be action 2 of this dynamic Action.

    MK

  • HOWTO estimate of progress during the use of parallelism of the iteration?

    If I have a loop with the parallelism of iteration activated, is there a good method for updating a progress bar without eliminating the potential speed boost?  The naïve approach to divide the final iteration by the total number of iterations is going crazy when I paralellisme iteration.

    Altenbach says:

    I have a simple solution that I think I posted a long time ago. I'll try to dig up...

    Found here... 

  • in the query and parent/child relationship

    WITH the data AS

    (

    SELECT '213NY1' lfrom, NULL, '215ZVD' mi lto, "215ZV9 ' id, 1 January 2014' sdate, January 2, 2014' edate, 3 January, 2014 'mdate' January 5, 2014 medate double UNION ALL.

    Lfrom SELECT NULL, '215ZVD' mi, id "213NY1", "215ZV9" lto 4 January 2014 'sdate', 6 January 2014 edate, January 7, 2014 'mdate', 8 January 2014 medate double UNION ALL

    SELECT '216TVZ' lfrom, NULL, "213JW7" e "217LVQ" id lto, 21 January, 2014 'sdate' January 9, 2014 edate, 10 January 2014 'mdate', 11 January 2014 medate double UNION ALL

    SELECT lfrom "215Y71", "217LVQ" lto, mi, "216TVZ" id "213JW7", 22 January, 2014 'sdate' January 23, 2014 edate, 24 January, 2014 'mdate' January 25, 2014 medate double UNION ALL

    SELECT '234IJF' lfrom, NULL, "234YU" e "3IUED" id lto, 26 January 2014 'sdate', 27 January 2014 edate, 28 January 2014 'mdate', 29 January 2014 medate OF double

    )

    some lines have parent/child relationship and some does not. for example, the first two query (data) are link together. online, the value of lto (215ZV9) corresponds to the id value

    in line 1.  the value of lfrom in row1 (213NY1) corresponds to the value of online id.

    the same scenario occurs in rows 3 and 4.  5th doesn't have any line which is a child. tier 5 is a single parent

    I want to WRITE a query that gives the following result.

    Mid id initial_date final_date

    =======================================

    215ZVD 215ZV9 1 January 2014 "January 5, 2014"

    "215ZVD 213NY1 7 January 2014" January 6, 2014 "

    "213JW7 217LVQ 21 January 2014 ' 11 January 2014"

    "213JW7 216TVZ 24 January 2014 ' 23 January 2014"

    "234YU 3IUED 26 January 2014 ' 27 January 2014"

    ONLY WHEN there is a parent/child relationship, initial DATE AND follow the final data WHAT such as

    FIRST date of deadline DATE

    < Mdate > < EDate > - for child

    < SDate > < MEDate > - for parent

    WHEN there is no relationship of parent/child (e.g. ONLY a parent ROW) THEN

    FIRST date of deadline DATE

    < SDate > < EDate-> parent

    can someone help me write a query for the above output

    with tt AS

    (SELECT a.*,

    ROW_NUMBER () ON LV (MIDDLE ORDER BY SDATE PARTITION),

    CASE

    WHEN ID = NVL (ADVANCE (lto, 1) OVER (PARTITION BY Middle ORDER BY sdate), LAG (lfrom) OVER (ORDER BY sdate Middle PARTITION))

    THEN 1

    END flg

    DATA one

    )

    SELECT THE MIDDLE,

    ID,

    CASE

    WHEN flg IS NOT NULL

    THEN

    CASE

    WHAT LV = 1

    THEN SDATE

    WHAT LV = 2

    THEN mDATE

    END

    Of ANOTHER sdate

    END INITIALDATE

    CASE

    WHEN flg IS NOT NULL

    THEN

    CASE

    WHAT LV = 1

    THEN mEDATE

    WHAT LV = 2

    THEN EDATE

    END

    Of ANOTHER edate

    END FINALDATE

    TT;

    Output:

    -------------

    MID ID INITIALDATE FINALDATE

    213JW7 217LVQ 21 January 2014 January 11, 2014

    213JW7 216TVZ 24 January 2014 23 January 2014

    215ZVD 215ZV9 January 1, 2014 5 January 2014

    215ZVD 213NY1 January 7, 2014 6 January 2014

    234YU 3IUED 26 January 2014 January 27, 2014

  • Simulate the 1 - N N - N relationship using the Parent-child structure

    Hello

    I have a 1-N relation between SKILL tables and the USER, which means 1 skill can be applied to multiple users. A jurisdiction may have a parent jurisdiction, which means that a ParentSkill inherits all the privileges of his child.

    I would like to simulate a N - N relation between the users and the skills by building a vision that goes through the parent-child relationship. This is possible for the construction?


    Current structure:
    |USERID | USERNAME | SKILLID  |
    +-------+----------+----------+
    |   1   |  Jack    |      1   |
    |   2   |  Simon   |      1   |
    |   3   |  Fred    |      3   |
    +-------+----------+----------+
    
    
    |SKILLID | DESCRIPTION   | PARENTSKILL  |
    +--------+---------------+--------------+
    |   1    |  Mechanic     |      2       |
    |   2    |  Inspector    |      3       |
    |   3    |  Supervisor   |      null    |
    +--------+---------------+--------------+
    Favorite exit (the skillid order is not important):
    |USERID | USERNAME | SKILLID  |
    +-------+----------+----------+
    |   1   |  Jack    |      1   |
    |   2   |  Simon   |      1   |
    |   3   |  Fred    |      3   |
    |   3   |  Fred    |      2   |
    |   3   |  Fred    |      1   |
    +-------+----------+----------+

    I hope that answers your needs:

    WITH
    users as
    (
        SELECT 1 as USERID, 'Jack' as USERNAME, 1 as SKILLID FROM DUAL UNION ALL
        SELECT 2 as USERID, 'Simon' as USERNAME, 1 as SKILLID FROM DUAL UNION ALL
        SELECT 3 as USERID, 'Fred' as USERNAME, 3 as SKILLID FROM DUAL
    ),
    skills as
    (
        SELECT SKILLID,CONNECT_BY_ROOT SKILLID AS ANCESTORS
        FROM
            (
                SELECT 1 as SKILLID, 'Mechanic' as DESCRIPTION, 2 as PARENTSKILL FROM DUAL UNION ALL
                SELECT 2, 'Inspector', 3 FROM DUAL UNION ALL
                SELECT 3, 'Supervisor', NULL FROM DUAL
            )
        CONNECT BY PRIOR PARENTSKILL = SKILLID
    )
    SELECT USERID,USERNAME,ANCESTORS
    FROM skills, users
    WHERE users.skillid = skills.skillid
    /
    
        USERID USERN  ANCESTORS
    ---------- ----- ----------
             1 Jack           1
             2 Simon          1
             3 Fred           3
             3 Fred           2
             3 Fred           1
    

    I hope this helps!

  • Prevent the child class dependency when the conditional use disable to specify the class in the development environment

    Hello

    I develop an application that I want to run on the normal systems and in real time using LabVIEW Proffesional Development System 2012 SP1

    To control how the application interacts with the user, I created a class that defines the type of user interface behavior that should allow me to have nice dialog boxes when the system is running on a machine windows and no dialog box (or any other friendly code in non-real time) if they sail on a real-time target.

    The parent class is the code that suits the actual time and the class of the child is the one with dialog boxes.

    To control the class of which it is responsible, I have a structure conditional disable. It works fine when the application is built in an executable or executable file in real time, but the problem arises when I want to use the code during development on the target in real time.

    I think that with the application under a target in real time (RT PXI), the proper case of the conditional - disable is enabled for the parent class is used, but the child classes are also listed under dependencies - I pressume it's because they exist on the block diagram in the case of persons disabled conditional turn off the diagram.

    This means that I can't deploy the code on the target in real time as it is unhappy with the class of the child code - even if it will never run.

    To save the poster my real project, I created an example with a Parent and child class and a flag to disable conditional 'class' to illustrate the problem.

    If you run Test.vi, you will see that the child class always gets locked (i.e. is addictive) while running even if it is not called.

    So - basically my question is: is what I can do about it or will I enough to disable it with conditionals and simply put the constant to correct class on the block diagram in the tests?

    Thanks in advance

    John.

    I feel your pain.  I came across something similar some time back.

    Apparently official NOR position is that you have to put a conditional structure of Disable IN EVERY ONE OF YOUR CLASS live.  In the Windows screws, you simply have a case of empty disable conditional with the windows code in another case and vice versa on the RT.

    I also much prefer the method you describe...

  • A-team Mobile persistence Accelerator - Insertion into the child records for a Parent-child data objects

    Hello team

    We use persistence Mobile Accelerator for our application of MAF. We must build couple of REST services for it (Fetch, Create, Update), problem is we are able to insert/update of the parent records but we are not able to create child records.

    It seems when we ask the operation of creation in the book of the child, is no new line for child is created.

    Here is the screenshot of the data control wizard:

    parent.pngchild.png

    Here is the task (update) and desktop (create) JSON format (TaskAssignment is the address of the child)

    PUT the task:

    {

    'Task': {}

    'ACTIVITY_ID': 100,.

    'PROJECTID': 100,.

    'ACTIVITY_NAME': "string",.

    'DESCRIPTION': 'string ',.

    'PARENT_ACTIVITY_ID': 100,.

    'STATUS': "string",.

    'PRIORITY': "string",.

    'PERCENTAGE_COMPLETE': 100,.

    "START_DATE": "2008-09 - 28 T 21: 49:45.

    "END_DATE": "2014-09 - 18 T 19: 18:33.

    'ETA': ' 2006-08 - 19 T 13: 27:14 - 04:00 ",".

    'ESTIMATED_HOURS': 100,.

    'ACTUAL_HOURS': 100,.

    'OWNER_USER_ID': 100,.

    'CREATED_BY': "string",.

    "CREATION_DATE': ' 2009-05 - 16 T 08: 42:28"

    'LAST_UPDATED_BY': 100,.

    'LAST_UPDATE_DATE': ' 2003-08 - 08T 20: 18:37 - 04:00 ",".

    "TaskAssignment": [{}

    'ASSIGNMENT_ID': 1000.00.

    'PROJECT_TEAM_MEMBER_ID': 1000.00.

    "START_DATE": "2012-09 - 13 T 09: 00:34 - 04:00", ".

    "END_DATE": "2009-10 - 14 T 03: 16:36."

    'CREATED_BY': "string",.

    'CREATION_DATE': ' 2010-03 - 18 T 12: 05:32.

    'LAST_UPDATED_BY': "string",.

    "LAST_UPDATE_DATE": "2018-12 - 28 T 14: 51:14 - 05:00", ".

    'FAVORITE_FLAG': "string".

    } ]

    }

    }

    Workstation:

    {

    "Task": [{}

    "ACTIVITY_ID": 1000.00.

    'PROJECTID': 1000.00.

    'ACTIVITY_NAME': "string",.

    'DESCRIPTION': 'string ',.

    'PARENT_ACTIVITY_ID': 1000.00.

    'STATUS': "string",.

    'PRIORITY': "string",.

    'PERCENTAGE_COMPLETE': 1000.00.

    "START_DATE": "2008-09 - 28 T 21: 49:45.

    "END_DATE": "2014-09 - 18 T 19: 18:33.

    'ETA': ' 2006-08 - 19 T 13: 27:14 - 04:00 ",".

    'ESTIMATED_HOURS': 1000.00.

    'ACTUAL_HOURS': 1000.00.

    'OWNER_USER_ID': 1000.00.

    'CREATED_BY': "string",.

    "CREATION_DATE': ' 2009-05 - 16 T 08: 42:28"

    'LAST_UPDATED_BY': "string",.

    'LAST_UPDATE_DATE': ' 2003-08 - 08T 20: 18:37 - 04:00 ",".

    "TaskAssignment": [{}

    'ASSIGNMENT_ID': 1000.00.

    'PROJECT_TEAM_MEMBER_ID': 1000.00.

    "START_DATE": "2012-09 - 13 T 09: 00:34 - 04:00", ".

    "END_DATE": "2009-10 - 14 T 03: 16:36."

    'CREATED_BY': "string",.

    'CREATION_DATE': ' 2010-03 - 18 T 12: 05:32.

    'LAST_UPDATED_BY': "string",.

    "LAST_UPDATE_DATE": "2018-12 - 28 T 14: 51:14 - 05:00", ".

    'FAVORITE_FLAG': "string".

    } ]

    } ]

    }

    Please let me know if I missed all the details.

    Waiting for answer!

    Thank you

    Diprish

    Massari,

    Task.Java seems good. The question is: how to create the new instance of task assignment in the UI?

    That's what you do: you must use the create operation standard of the palette of the title of the collection of nested task assignment data control. Thus, enrich the collection of task, the collection taskAssignment nested in the task, expand the node of the operations and drag and drop the operation of creation on your page. This should add the new instance to the collection of the current task task assignment. To make sure that this is the case, set a breakpoint in the addTaskAssignment method in Task.java. Then, when you save the parent task, load useful json must include a table nested with the new task assignment.

    Steven Davelaar,

    Oracle Mobile A-team.

  • Default filters that users can delete (in the parent/child Setup)?

    Is it possible in Latitude 2.2.2 to have filters (filters of the range, refinement filters etc.) applied by default (which means that users see these filters when they log-in), but they can also remove (using bread crumbs portlet) if they wanted to? We tried to use the source of data (JSON) filters (using 'baseFunctions' setting) where we have a parent/child Setup, but it seems these filters cannot be removed once applied. Note that filters can be removed if we do not have a parent/child relationship between the data sources, but as soon as we introduce a parent/child relationship between the data sources (which we need), the GET of sticky filters and cannot be deleted. Any reason why the parent/child relationship causes the filters becoming sticky? Any way (alternate) to reach what we want?

    I think that it is a known problem (LSTUDIO-5088) and there could be a fix for this. You can contact technical support to obtain the fix.

    Dave

  • Stuck on a sql query to search for records that have the same parent child records

    Oracle 10 g 2 Enterprise Edition.

    Hello

    I'm writing a logic to find records in a parent table, who have the same values in a child table.
    This is part of a larger application, but I am stuck on that part for now, so I have mocked some of the below simplified tables to capture the heart of the
    the problem is that I'm stuck.
    Let's say I have a responsible parent, child employee table table and there are a number of many relationships between them.
    The aptly named Join_Table manages the relationship between them. If a manager can manage several employees, an employee can be managed by
    many managers.

    I have a feeling it's stupidly easy, but it seems to me having a bad episode of brain freeze today!
    -- parent table
    CREATE TABLE manager (
     id      number primary key,
     name      varchar2(100));
    
    -- child table 
    CREATE TABLE employee (
     id          number primary key,
     name      varchar2(100));
    
    -- link table
    CREATE TABLE join_table (
     manager_id          NUMBER, 
     employee_id      NUMBER,
     CONSTRAINT join_table_pk PRIMARY KEY (manager_id, employee_id),
     CONSTRAINT manager_fk FOREIGN KEY (manager_id) REFERENCES manager(id),
     CONSTRAINT employee_fk FOREIGN KEY (employee_id) REFERENCES employee(id) 
     );
    
    -- Insert some managers
    INSERT INTO manager (id, name) VALUES (1, 'John');
    INSERT INTO manager (id, name) VALUES (2, 'Bob');
    INSERT INTO manager (id, name) VALUES (3, 'Mary');
    INSERT INTO manager (id, name) VALUES (4, 'Sue');
    INSERT INTO manager (id, name) VALUES (5, 'Alan');
    INSERT INTO manager (id, name) VALUES (6, 'Mike');
    
    -- Insert some employees 
    INSERT INTO employee (id, name) VALUES (101, 'Paul');
    INSERT INTO employee (id, name) VALUES (102, 'Simon');
    INSERT INTO employee (id, name) VALUES (103, 'Ken');
    INSERT INTO employee (id, name) VALUES (104, 'Kevin');
    INSERT INTO employee (id, name) VALUES (105, 'Jack');
    INSERT INTO employee (id, name) VALUES (106, 'Jennifer');
    INSERT INTO employee (id, name) VALUES (107, 'Tim');
    
    -- Insert the links
    -- John manages Paul, Simon, Ken
    INSERT INTO join_table (manager_id, employee_id) VALUES (1, 101);
    INSERT INTO join_table (manager_id, employee_id) VALUES (1, 102);
    INSERT INTO join_table (manager_id, employee_id) VALUES (1, 103);
    -- Bob manages Paul, Simon, Kevin, Jack
    INSERT INTO join_table (manager_id, employee_id) VALUES (2, 101);
    INSERT INTO join_table (manager_id, employee_id) VALUES (2, 102);
    INSERT INTO join_table (manager_id, employee_id) VALUES (2, 104);
    INSERT INTO join_table (manager_id, employee_id) VALUES (2, 105);
    -- Mary manages Jennifer, Tim
    INSERT INTO join_table (manager_id, employee_id) VALUES (3, 106);
    INSERT INTO join_table (manager_id, employee_id) VALUES (3, 107);
    -- Sue manages Jennifer, Tim
    INSERT INTO join_table (manager_id, employee_id) VALUES (4, 106);
    INSERT INTO join_table (manager_id, employee_id) VALUES (4, 107);
    -- Alan manages Paul, Simon, Ken, Jennifer, Tim
    INSERT INTO join_table (manager_id, employee_id) VALUES (5, 101);
    INSERT INTO join_table (manager_id, employee_id) VALUES (5, 102);
    INSERT INTO join_table (manager_id, employee_id) VALUES (5, 103);
    INSERT INTO join_table (manager_id, employee_id) VALUES (5, 106);
    INSERT INTO join_table (manager_id, employee_id) VALUES (5, 107);
    -- Mike manages Paul, Simon, Ken
    INSERT INTO join_table (manager_id, employee_id) VALUES (6, 101);
    INSERT INTO join_table (manager_id, employee_id) VALUES (6, 102);
    INSERT INTO join_table (manager_id, employee_id) VALUES (6, 103);
    
    -- For sanity
    CREATE UNIQUE INDEX employee_name_uidx ON employee(name);
    If I ask for Manager John, so I want to find other managers who manage the exact list and even employees.
    Answer should be Mike.
    If I ask for Manager of Mary, the answer should be Sue.

    This query will give me the list of managers who manage some of the same employees as John, but not the same employees accurate...
    SELECT DISTINCT m.name AS manager
    FROM manager m, join_table jt, employee e
    WHERE m.id = jt.manager_id
    AND jt.employee_id = e.id
    AND e.id IN (
         SELECT e.id
         FROM manager m, join_table jt, employee e
         WHERE m.id = jt.manager_id
         AND jt.employee_id = e.id
         AND m.name = 'John')
    ORDER BY 1;
    I thought about using set operations to find managers with a list of employees less than my employees is null and where my employees under their list of employees is null. But there must be an easier way more elegant.
    Any ideas?
    BTW, I need to run as a batch on tables with > 20 million rows so the efficiency of queries is key.

    What about...

    WITH manager_list AS
    (
     SELECT name,
            LTRIM(MAX(SYS_CONNECT_BY_PATH(id,','))
            KEEP (DENSE_RANK LAST ORDER BY curr),',') AS employees
     FROM   (SELECT m.name,
                    e.id,
                    ROW_NUMBER() OVER (PARTITION BY m.name ORDER BY e.id) AS curr,
                    ROW_NUMBER() OVER (PARTITION BY m.name ORDER BY e.id) -1 AS prev
             FROM   manager m,
                    join_table jt,
                    employee e
      WHERE m.id           = jt.manager_id
      AND   jt.employee_id = e.id
      AND   m.name = :P_MANAGER)
      GROUP BY name
      CONNECT BY prev = PRIOR curr AND name = PRIOR name
      START WITH curr = 1
    ), all_list AS
    (
     SELECT name,
            LTRIM(MAX(SYS_CONNECT_BY_PATH(id,','))
            KEEP (DENSE_RANK LAST ORDER BY curr),',') AS employees
     FROM   (SELECT m.name,
                    e.id,
                    ROW_NUMBER() OVER (PARTITION BY m.name ORDER BY e.id) AS curr,
                    ROW_NUMBER() OVER (PARTITION BY m.name ORDER BY e.id) -1 AS prev
             FROM   manager m,
                    join_table jt,
                    employee e
      WHERE m.id           = jt.manager_id
      AND   jt.employee_id = e.id)
      GROUP BY name
      CONNECT BY prev = PRIOR curr AND name = PRIOR name
      START WITH curr = 1
    )
    SELECT a.*
    FROM   manager_list m,
           all_list a
    WHERE  m.employees = a.employees
    

    Would be easier in 11g, but I do not have a facility here so this is based on 10g.

    See you soon

    Ben

  • Insert the parent/Child records in an xml file...

    XML file pasted below:

    I loaded the xml file in a table called xml_demo that has a column of type xmltype donnees_xml.

    The Select to parent record is thus, and it works:

    INSERT INTO balit_submissions (balitdoc, documentversion, datetime_from, job_id, status, creation_datetime)
    (SELECT 'MOL'
    ((, to_number(extract(x.xml_data,'/MolDocument/DocumentVersion/@v'))
    (, to_date(substr(extract(x.xml_data,'/MolDocument/ValidTimeInterval/@v'),1,16),
    "yyyy-mm-dd HH24" T"")
    123456
    "CREATED",
    NULL VALUE
    OF xml_DEMO x WHERE
    (([existsnode(x.xml_DATA,'/MolDocument/DocumentIdentification[@v="MOL_20100331_1500_1600"]') = 1).
    /

    Having problem creating records child. From this file, I expect to create 3 folders.

    insert into balit_energy_blocks
    (
    SO_ID,
    DATETIME_FROM,
    DIRECTION,
    BLOCK_NUMBER,
    ENERGY,
    LAST_SUBMIT_DATETIME,
    PRICE_POUNDS,
    PRICE_EUROS,
    BALIT_REF,
    STATUS,
    LAST_EDIT_DATETIME,
    MOL_REASON,
    ACQUIRING_SO_AREA)
    (SELECT 'TEN'
    (, to_date(substr(extract(x.xml_data,'/MolDocument/ValidTimeInterval/@v'),1,16),
    "yyyy-mm-dd HH24" T"")
    (, DECODE(extract(x.xml_data,'/MolDocument/MolTimeSeries/Direction/@v'),'AO1','Up','Down')
    (, to_number(substr(extract(x.xml_data,'/MolDocument/MolTimeSeries/ContractIdentification/@v'),19))
    ((, to_number(extract(x.xml_data,'/MolDocument/MolTimeSeries/Period/Interval/EnergyPrice/@v'))
    sysdate
    , null - price books
    , null - price euro
    (, extract(x.xml_data,'/MolDocument/MolTimeSeries/ContractIdentification/@v')
    "PRESENTED".
    , "A96.
    NULL - acquisition of area
    sysdate
    OF xml_DEMO x WHERE
    (([existsnode(x.xml_DATA,'/MolDocument/DocumentIdentification[@v="MOL_20100331_1500_1600"]') = 1).
    /

    For example, there are 3 ContractIdentification tags. Example 1:

    < ContractIdentification v = "RTE_20100331_1500_16" / >

    I expect this selection to snatch the last issue of this string. In this case, 16.
    The selection was:
    TO_NUMBER(substr(extract(x.xml_DATA,'/MolDocument/MolTimeSeries/ContractIdentification/@v'),19))

    The result I got was:

    16RTE_20100331_1500_20NG_20100331_1500_6

    All values of contractident are concatnated and returns posted 19 go.

    Can someone help me to extract the last number of each tag value of ContractIdentification and create the 3 files

    Thank you

    James Sathiaraj

    <? XML version = "1.0" encoding = "UTF-8"? >
    < MolDocument DtdVersion = "3" DtdRelease = "0" >
    < DocumentIdentification v = "MOL_20100331_1500_1600" / >
    < DocumentVersion v = "1" / >
    < V DocumentType = "A43" / >
    < CodingScheme = v "A01" SenderIdentification = "17X100Z100Z0001H" / >
    < SenderRole v = "35" / >
    < ReceiverIdentification codingScheme = v "A01" = "10XFR-TEN - Q" / >
    < ReceiverRole v = "A04" / >
    < CreationDateTime v = "2010-03 - 31 T 14: 10:00Z" / >
    < ValidTimeInterval v = "2010-03 - 31 T 15: 00Z / 2010-03 - 31 T 16: 00Z" / >
    < codingScheme domain = "A01" v = "10YDOM-1001A001A" / >
    < MolTimeSeries >
    < ContractIdentification v = "RTE_20100331_1500_16" / >
    < ResourceProvider codingScheme = v "A01" = "10XFR-TEN - Q" / >
    < CodingScheme = v "A01" AcquiringArea = "17Y100Z100Z00013" / >
    < ConnectingArea codingScheme = v "A01" = "10YFR-TEN - C" / >
    < AuctionIdentification v = "AUCTION_20100331_1500_1600" / >
    < BusinessType v = "10" / >
    < BidTimeInterval v = "2010-03 - 31 T 15: 00Z / 2010-03 - 31 T 16: 00Z" / >
    < MeasureUnitQuantity v = "MAW" / >
    < v currency = "EUR" / >
    < MeasureUnitPrice v = "MWH" / >
    < v direction = "A02" / >
    < MinimumActivationQuantity v = "50" / >
    < v status = "A06" / >
    < period >
    < v TimeInterval = "2010-03 - 31 T 15: 00Z / 2010-03 - 31 T 16: 00Z" / >
    < resolution v = "PT60M" / >
    <>interval
    < v pos = "1" / >
    < v Qty = "50" / >
    < character v = "50.45" / >
    < / interval >
    < / period >
    < / MolTimeSeries >
    < MolTimeSeries >
    < ContractIdentification v = "RTE_20100331_1500_20" / >
    < ResourceProvider codingScheme = v "A01" = "10XFR-TEN - Q" / >
    < CodingScheme = v "A01" AcquiringArea = "17Y100Z100Z00013" / >
    < ConnectingArea codingScheme = v "A01" = "10YFR-TEN - C" / >
    < AuctionIdentification v = "AUCTION_20100331_1500_1600" / >
    < BusinessType v = "10" / >
    < BidTimeInterval v = "2010-03 - 31 T 15: 00Z / 2010-03 - 31 T 16: 00Z" / >
    < MeasureUnitQuantity v = "MAW" / >
    < v currency = "EUR" / >
    < MeasureUnitPrice v = "MWH" / >
    < v direction = "A02" / >
    < MinimumActivationQuantity v = "50" / >
    < v status = "A06" / >
    < period >
    < v TimeInterval = "2010-03 - 31 T 15: 00Z / 2010-03 - 31 T 16: 00Z" / >
    < resolution v = "PT60M" / >
    <>interval
    < v pos = "1" / >
    < v Qty = "50" / >
    < character v = "50.48" / >
    < / interval >
    < / period >
    < / MolTimeSeries >
    < MolTimeSeries >
    < ContractIdentification v = "NG_20100331_1500_6" / >
    < ResourceProvider codingScheme = v "A01" = "10X1001A1001A515" / >
    < CodingScheme = v "A01" AcquiringArea = "17Y100Z100Z00013" / >
    < CodingScheme = v "A01" ConnectingArea = "10YGB - A" / >
    < AuctionIdentification v = "AUCTION_20100331_1500_1600" / >
    < BusinessType v = "10" / >
    < BidTimeInterval v = "2010-03 - 31 T 15: 00Z / 2010-03 - 31 T 16: 00Z" / >
    < MeasureUnitQuantity v = "MAW" / >
    < v currency = "EUR" / >
    < MeasureUnitPrice v = "MWH" / >
    < v direction = "A01" / >
    < MinimumActivationQuantity v = "50" / >
    < v status = "A06" / >
    < period >
    < v TimeInterval = "2010-03 - 31 T 15: 00Z / 2010-03 - 31 T 16: 00Z" / >
    < resolution v = "PT60M" / >
    <>interval
    < v pos = "1" / >
    < v Qty = "50" / >
    < character v = "17.0" / >
    < / interval >
    < / period >
    < / MolTimeSeries >
    < / MolDocument >

    Hello

    The result I got was:

    16RTE_20100331_1500_20NG_20100331_1500_6

    In the query have you tried, access you a single record if you can not expect to get three rows of "magic". The EXTRACT function works as planned, it retrieves the nodes required, but the result is always a fragment of XML (a scalar value).
    To achieve your goal, you must divide the sequence MolTimeSeries in relational lines.

    Two similar solutions are possible, XMLTable (10gr 2 and more) or Table/XMLSequence.
    In your other post, you mentioned db version 10.1, so I guess we go with XMLSequence:

    SELECT 'RTE'
           ,to_date(substr(extractvalue(x.xml_data,'/MolDocument/ValidTimeInterval/@v'),1,16),'yyyy-mm-dd"T"hh24:mi')
           ,decode(extractvalue(x2.column_value,'/MolTimeSeries/Direction/@v'),'A01','Up','Down')
           ,to_number(regexp_substr(extractvalue(x2.column_value,'/MolTimeSeries/ContractIdentification/@v'),'\d+$'))
           ,to_number(extractvalue(x2.column_value,'/MolTimeSeries/Period/Interval/EnergyPrice/@v'))
           ,sysdate
           ,null
           ,null
           ,extractvalue(x2.column_value,'/MolTimeSeries/ContractIdentification/@v')
           ,'SUBMITTED'
           ,'A96'
           ,null
           ,sysdate
    FROM xml_demo x,
         table(
           xmlsequence(
             extract(x.xml_data, '/MolDocument/MolTimeSeries')
           )
         ) x2
    WHERE existsnode(x.xml_data,'/MolDocument/DocumentIdentification[@v="MOL_20100331_1500_1600"]') = 1;
    

    Also note the use of instead of the ordinary SUBSTR REGEXP_SUBSTR because he has not worked for "NG_20100331_1500_6".

    Hope that helps.

    Published by: odie_63 on June 24, 2010 21:18 - comment added regexp

  • Update the data to uppercase in the parent/child tables

    Hi gurus!

    In production, we have a table product and that is in reference by many tables making parent child relationship. By mistake, we realized last month some products have been added to lowercase and now we have a request to update all these product codes uppercase so that existing code that use these tables have no impact. Appreciate if you can give an idea about how can I update the existing data in the table parent uppercase as well as child records?

    Concerning
    Sri

    Are the product code that you need to update what is stored in the tables of children? If Yes, then you must do it in several steps, something like:

    Identify the child tables

    SELECT table_name, constraint_name
    FROM user_constraints
    WHERE r_constraint_name = (SELECT constraint_name
                               FROM user_constraints
                               WHERE table_name = 'PRODUCT_TABLE' and
                                     constraint_type = 'P');
    

    Create new product of upper-case code in the product table:

    INSERT INTO product_table
    SELECT UPPER(product_code), other_columns
    FROM product_table
    WHERE product_code <> UPPER(product_code);
    

    Update the children tables for caps product codes

    UPDATE child1
    SET product_code = UPPER(product_code)
    WHERE product_code <> UPPER(product_code);
    

    Finally, remove the tiny product_table product codes

    DELETE FROM product_table
    WHERE product_code <> UPPER(product_code);
    

    John

  • ATER the MovieClip Parent child size resize?

    My main movie clip has a child clip inside. When I resize the main clip the child clip dimensions seem to stay the same. I perform a trace on the width and height of the element of the child, and no matter what I resize the main clip to the dimensions are the same as before. It is possbile to know the size of what the child is after a parent resize? Thank you

    You're scaling of the parent and if the child clip will appear larger.
    its width and height will remain the same. This is because it is of dimensions
    have not really changed, her parents have. To get the clip of the child
    * screen * use of width:

    nActualWidth = mcParent.mcChild._width/100*mcParent._xscale;

    --
    -------------------------------
    Remove "_spamkiller_" at the post office
    -------------------------------

  • Parent-child queries to the Web Service 2.0

    Hello

    Our team has begun working on the integration of ws ws 1.0 2.0. A question of Tuff which meet us and we are looking for assistance is:

    As inside 2.0 all objects are exposed to the same level and the attachments of the child objects are not exposed (compared to the 1.0 ws that attach childs along ListOfXXX, parents), we wonder how to interrogate these child objects now? More explicitly, namely the parent object, how to retrieve its child objects? Or it is impossible since ws 2.0?

    This question is really confusing us now, and we have not found the answer in the new "Oracle Web Service on request Guild v4.0.

    Any help/answer/comment/suggestion on this issue would be grateful!

    Fang

    At that time, WS v2.0 does not support child objects. It supports only the top-level parent objects. So if you need for the child o bjects query, you will need to use the interface of WS v1.0.

    Jaya

  • Cannot open the component of the battery of the 3rd generation Apple TV remote.  The "cover" stripped is by using a coin to turn the cover counterclockwise. Any suggestions?

    On the component of the battery of the 3rd generation Apple TV remote, the "lid" is getting stripped by using a coin to turn the cover counterclockwise. I even used a screwdriver flat head with a cloth & it will not always be open.

    It is partially open, but I think there was some debris. I disabled the debris, but the "lid" is badly stripped. I stopped as I would not completely destroy the compartment cover. Any suggestions?

    I had a similar problem with another camera, but a very similar configuration, a round lid on a stack of pancakes about two years ago. I got to have adhesive PuTTY handy of Museum at the time.  I took enough Putty to cover the circular cover, let it sit for just a moment, or so that he could 'stick' (it's not like glue, it will come off easily). I have enough of the dough (about a 3/4 inch ball) used to create a handle and everything pushing down pretty firmly on the sealant to keep it on the cover, I did one-quarter turn and cover came out. I just took my money AppleTV 3 remote out of storage and tried this technique on her, and she seemed to cling to the coverage and helped me with the tour. My remote money is not received tap stuck like yours and the housing is in good condition. But it might be interesting to try. If you live in Irvine, California you should probably have some of this PuTTY on hand. It is usually used to prevent the fall during an earthquake of trinkets and other fragile objects of light weight. If all else fails, a new remote money is always available on the Apple Store for $19. Good luck.

  • The unnecessary use of synchronize in code example in the Dev Guide

    I ask this question with some trepidation, I'm sure someone out there will be able to explain it and then I'll feel really stupid asking.  But that's...

    Using a HTTP connection code sample in the developer's Guide (I checked 4.3 and 4.5, and it's the same in these two levels), use synchronized in two places that I don't understand.

    (1) getUrl() - Code follows

    /**
    * Retrieve the URL. The synchronized keyword ensures that one
    * thread at a time can call this method on a ConnectionThread object.
    */
    public synchronized String getUrl() {}
    Return _theUrl;
    }

    I understand the comment, and it is sometimes useful force methods you want to synchronize.  But not this method in vessel closed.  If anything, there are more cases of use of this mechanism for the recovery method in this code.

    (2) around of the fetch block - following Code:

    / * Make sure that pull requests are not missed
    * While the received data is processed.
    */
    {Synchronized (this)}
    Open the connection

    When I see a synchronization block like that, I guess it's a little shared code that can be executed by multiple threads, which this clearly isn't.  So why is it synchronized?

    In fact, I think that 'design' is a testament to this example may be imperfect.  I think it would be better to have a new Thread for each connection, or have a queue (synchronized) URL addressing.

    As evidenced by another thread on this forum, the developers make these samples as Gospel and try to use them.  So if this is wrong, perhaps we could fix.  But maybe it just me being a lumberjack full.  Wouldn't be the first time...  And won't be the last!

    It seems that this example has been designed with a base defense to the following (if no synchronization) scenario:

    Event thread request _start = true.

    Threaded starts the connection.

    Event thread again pray _start = true.

    Threaded end connection, defines _start = false.

    Net result: the second event thread request is not met.

    That being said, the guys are right: this design is mediocre at best.  In the scenario above, the second request of event thread is blocked while the thread of the connection ends... and as everyone knows at this point, blocking the event thread usually leads to a world of pain.  There are certainly better approaches that can be used here, and probably the easiest way to this problem is just to have the best control flow, such as not allowing not a new connection request while one is already underway.  Certainly the synchronization adds excessive complexity to this problem and distracts from what the sample is trying to demonstrate: a simple HTTP connection.

    For this example, and the extraction, I will recommend to the authors that both be reviewed and be a structure such that these samples are as simple as possible.  Thanks to Peter marchywka for their suggestions.  Comments like yours, it's how we identify areas for improvement.

Maybe you are looking for

  • Satellite L300-11F - looking for the replacement of the CPU

    Hello all, I am pleased to join this forum preety. I'll start with one of my problems using my laptop, I'm looking for someone who can help me.I usually play WoW of this unit, but since the time my computer does not help me. The gameplay becomes slow

  • How can I change the billing address for my Apple Store account?

    Hello I recently moved and I want to update the billing address in my Apple Store account. I'm trying to complete your address after the connection, but he keeps asking my credit card number and the form submit unless I fill in a number. I have never

  • My computer has no sound.

    I had her b4 the day, but not today.  I tried to stop, unplug the unit.  Still no sound.  I checked the speakers.  They are very good.  I turned the sound down with the button for her yesterday, tried to put it up today... can not.  Nothing happens w

  • I need assistance with obtaining this virus roaming / Redirector.KL removed from my computer

    I just did a scan of microsoft security and it detected a file infected after the first hour, but after a good 5 hours or so he stopped and when I went to see the results he said I got this virus roaming / Redirector.KL and it has been partially remo

  • Symbol '%' search in Windows 7 Explorer

    For the purposes of electronic filing I have to delete all the symbol % appearing in the names of files, because it could stop the routine, then the search function is really useful for me. I recently got Windows 7 and am no more able to successfully