POPUP - Parent - Child handling

I have a Page(.jsff).From that i am calling a POPUP1 (ADF - Popup : Diaglog, Type: Cancel,Modal). In POPUP1 i am calling a POPUP2(ADF popup: Dialog,Type: Cancel,Modal)).In that POPUP2 added a facet "buttonbar" named (OK) . On click that OK button both(POPUP1 and POPUP2) are closed.If i clicked the CANCEL button the POPUP2 only closed.But I click on OK the both POPUPs was closed. Please suggest me how to handle this. Whats are the ways to Hangle POPUP with in POPUP. Thanks lot.
Need more clarification on this issue please revert.
Thanks
N.Mohanraj
Edited by: Mohanraj's Vision on Jul 3, 2012 11:30 AM

Hi,
check if the command button has partialSubmit="true" set to avoid a redirect. Also, you may want to check that the popup has autoCancel set to disabled, which prevents the popup to be closed if the focus is moved out of it. To close a popup in the managed bean action you access the popup instance and then call hide() on it. Note that the Hints argument is an inner class of RichPopup
Frank

Similar Messages

  • ADF: Parent Child Window Popup

    Hi All,
    I am having a requirement in which, I am trying to create Parent Child window in ADF. I will give some information in the Parent form and there will be a button which will popup a child window and I will enter some information in a child window and submit, it should come to parent page without displaying the details entered in the child window and once I click the submit button in the Parent window, both the Parent and Child window Detaiils should get saved to the database. I am trying to use ADF or ADF BC.
    Please provide me the steps that need to be followed.
    Thanks.

    This is a common use case. You question on the other hand shows that you not really tried the figure our the answers yourself.
    It's too much you ask us to do your work.
    First you should think which technology (swing or faces) you want to use. Then you should read up some of the documents (i.e. the Fusion Order Demo, or any other sample or cue card) to get some knowledge of the framework.
    I you have a problem then, come back and mention the jdev Version you are using.
    Timo

  • How to handle parent-child dimension in OWB?????

    i have a dimension have many levels,and the amount of levels is varing,so i cannot use the wizard to define my dimension ,seems with OWB i can only define dimension with certain amount of levels.......
    my dimension data is stored with this format:
    child parent
    Los Angles US
    US WORLD
    it is called a parent-child relation ,how can i define dimension with parent-child relation witn OWB...
    Can OWB do it ?????

    i have a dimension have many levels,and the amount of levels is varing,so i cannot use the wizard to define my dimension ,seems with OWB i can only define dimension with certain amount of levels.......
    my dimension data is stored with this format:
    child parent
    Los Angles US
    US WORLD
    it is called a parent-child relation ,how can i define dimension with parent-child relation witn OWB...
    Can OWB do it ????? You must define a dimension, define the dimension levels and the hierarchy inside the dimension (a hierarchy can have as many levels as you want, parent-child relationship is a normal hierarchy concept - no rocket science here). Then you have to map the data source for the dimension levels appropriately. Please refer to the user manual, chapter 4 ("Defining dimensianal targets") for details.
    Regards:
    Igor

  • Help needed in retrieving parent child relationship values

    Hi,
    I have a requirement to get parent child relationship values as below.
    Ex: Address table
    cont cont_code state state_code
    C1 10 S1 1
    C1 10 S2 2
    C1 10 S3 3
    C2 20 S4 4
    C2 20 S5 5
    C3 30 S6 6
    C3 30 S7 7
    C3 30 S8 8
    I want a result of country/state and corresponding code like below.
    corresponding states should be displayed under each country with some space appended to it.
    Geography code
    C1 10
    S1 1
    S2 2
    S3 3
    C2 20
    S4 4
    S5 5
    C3 30
    S6 6
    S7 7
    S8 8
    I am using oracle 10g version.
    Thanks in advance.

    Hi,
    When you post formatted text (like your output) on this site, type these 6 characters:
    \(small letters only, inside curly brackets) before and after each section of formatted text, to preserve spacing.
    I think you're saying that you want this output:GEOGRAPHY CODE
    C1 10
    S1 1
    S2 2
    S3 3
    C2 20
    S4 4
    S5 5
    C3 30
    S6 6
    S7 7
    S8 8
    If so, UNION, as Hoek suggested, is a good way.
    GROUP BY ROLLUP is more efficient, but harder to understand:SELECT     CASE
              WHEN GROUPING (state) = 1
              THEN cont
              ELSE ' ' || state
         END          AS geography
    ,      CASE
              WHEN GROUPING (state) = 1
              THEN MAX (cont_code)
              ELSE MAX (state_code)
         END          AS code
    FROM     t
    GROUP BY cont
    ,      ROLLUP (state)
    ORDER BY cont
    ,      state          NULLS FIRST
    By the way, this looks like a bad table design.
    In a relational database, the fact that the name 'C1' belongs to cont_code 10 should only be stored in one place.  You have the same information on 3 separate rows.
    Also, if 'C1' and 'S1' are both names, they should probably be in the same column, so that (to give just one example) you can find the information about 'x1' without knowing if it is a cont or a state.
    A better design would be.NAME     CODE     PARENT     DSCR
    ====     ====     ======     ====
    C1     10          CONT
    S1     1     10     STATE
    S2     2     10     STATE
    S3     3     10     STATE
    C2     20          CONT
    S4     4     20     STATE
    S5     5     20     STATE
    C3     30          CONT
    S6     6     30     STATE
    S7     7     30     STATE
    S8     8     30     STATE
    If the data is this simple, then the dscr column isn't needed.  Whether parent is NULL or not tells whether the rows represents a cont or a state.
    To get the results you want from a table like this, you could use CONNECT BY.  Using either UNION or ROLLUP, you have to know, at the time you write the query, how many levels there will be in the parent-child tree, and the length of the code is proportional to that depth, and the table has to be changed if you ever need to add another level.  CONNECT BY can handle any number of levels, and the length and complexity of the code is the same whether you have just 2 levels (countries and strates), or 7 levels (continents, regions, countiries, states, districts, cities and neighborhoods) or 72 levels.  The table doesn't need any more columns, no matter how deep the tree gets.
    Edited by: Frank Kulash on Sep 16, 2010 11:54 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Navigation in Parent Child Hiearachy is a bug in OBIEE 11.1.1.6 ?

    Hi All,
    Please look into one of my earlier posts
    OBIEE 11g - Navigation in Parent Child Hiearchy not working
    One of my friends Ram told me that this is an Oracle Bug in 11.1.1.6. It's I just wanted to know if anybody has faced the same issue and reported this as a bug in Oracle. Unfortunately, i don't have the privileges to log a bug or see the bug information, can anybody please provide any information on this ?
    Thanks,
    Ronny

    Hi,
    Bug 14406555 : 11.1.1.6.2BP1 UPGRADE : ACTION LINK INTERACTION FAILS WITH GETLEVELINFO ERROR
    FYI: MOS
    What actually did happen?
    After the upgrade, when they expand the parent-child hierarchy and click on the measure column to navigate through the Action Link, nothing happens and they see error in the IE browser at the bottom - Message: 'getLevelInfo(...)' is null or not an objectLine: 1Char: 11175Code: 0URI: http://nyfsqla105.ny.fw.gs.com:9704/analytics/res/b_mozilla/answers/selectionsmodel.js It does not show any error in FF but it does not do anything. Inspite of checking "Do not display in a popup if only one action link is available at runtime" for Action links, it does show pop up after the upgrade.
    Thanks
    Deva

  • ForEach iterator in parent child relation

    Hi,
    How can i use forEach to iterate parent child view object. Issue it is only able to fetch value of parent vo not child view object values, if I use af:iterator instead of af:forEach it works perfectly. So there is no issue with data.
    But I am not able to iterate child VO.
    <af:forEach items="#{bindings.testVO.rangeSet}"
    var="parent" varStatus="parentRow" >
    <af:outputText value="#{parent.Name}"/> -- it works fine prints value
    <af:forEach items="#{parentRow.childVO.rangeSet}"
    var="child" varStatus="childRow" >
    <af:outputText value="#{child.subject}"/> ---> It doesn't work
    </af:forEach>
    </af:forEach>
    If i use iterator it works fine... But I have to use forEach to generate dynamic id for each component in forEach Loop

    I tried to use af:iterator first but the problem is it is not able to handle dynamic id generation for each component:
    <af:iterator value="#{bindings.companyVO.collectionModel}"
    var="company" varStatus="companyStatus"
    rows="#{bindings.companyVO.rangeSize}">
    <af:iterator value="#{company.employeeVO}"
    var="employee" varStatus ="employeeStatus">
    <af:outputLabel id="emp${companyStatus.index}${employeeStatus.index}" value="#{employeee.empId}"/> ->>> here id is always emp it is not able to get index value and if i used the same code in forLopp it works it is able to fetch dynamic id based on index like emp12 emp13 emp14 etc...
    </af:iterator>
    </af:iterator>

  • Dynamic hierarchy in parent child hierarchy table??

    Do you have any experience to handle the requirement of dynamic hierarchy in universe/webi?
    We have some data in parent child hierarchy as below u201CCustomeru201D table.
    Customer
    Parent          Child
    Z                  A
    Z                  B
    A                  AA
    B                  BB
    AA               AAA
    For example, Company Z is the parent company of Company A.
    Another table, Amount is the amount value of different Customers.
    Amount
    ID               Amt
    AA               10
    AAA            1
    BB                2
    Is there any functionality in Universe designer to build related Classes and objects, So that the web intelligence documents represent the following report with the drilling results?
    When we want to see the ID and Amt, the expected result should be:
    Z                13
    when we drill down Z
    the result should be:
    A                11
    B                2
    when we drill down A:
    the result should be:
    AA              11
    notes **
    the level of hierarchy is dynamic
    Any suggestion is appreciated.  Thanks.

    Hi,
    The only way to do it is to create recursive derived table that flatten you parent child hierarchy with a given maximum depth.
    Here is a sample I built a long time ago to flatten a parent-child hierarchy on Employees table in Foodmart database (SQL Server).
    Didier
    SELECT DISTINCT
         Z.employee_id,
         A.supervisor_id_1,
         A.employee_id_1,
         A.full_name_1,
         A.supervisor_id_2,
         A.employee_id_2,
         A.full_name_2,
         A.supervisor_id_3,
         A.employee_id_3,
         A.full_name_3,
         A.supervisor_id_4,
         A.employee_id_4,
         A.full_name_4,
         A.supervisor_id_5,
         A.employee_id_5,
         A.full_name_5,
         A.supervisor_id_6,
         A.employee_id_6,
         A.full_name_6,
         Z.supervisor_id AS supervisor_id_7,
         Z.employee_id AS employee_id_7,
         Z.full_name AS full_name_7
    FROM employee Z,
         SELECT DISTINCT
              A.supervisor_id_1,
              A.employee_id_1,
              A.full_name_1,
              A.supervisor_id_2,
              A.employee_id_2,
              A.full_name_2,
              A.supervisor_id_3,
              A.employee_id_3,
              A.full_name_3,
              A.supervisor_id_4,
              A.employee_id_4,
              A.full_name_4,
              A.supervisor_id_5,
              A.employee_id_5,
              A.full_name_5,
              Z.supervisor_id AS supervisor_id_6,
              Z.employee_id AS employee_id_6,
              Z.full_name AS full_name_6
         FROM employee Z,
              SELECT DISTINCT
                   A.supervisor_id_1,
                   A.employee_id_1,
                   A.full_name_1,
                   A.supervisor_id_2,
                   A.employee_id_2,
                   A.full_name_2,
                   A.supervisor_id_3,
                   A.employee_id_3,
                   A.full_name_3,
                   A.supervisor_id_4,
                   A.employee_id_4,
                   A.full_name_4,
                   Z.supervisor_id AS supervisor_id_5,
                   Z.employee_id AS employee_id_5,
                   Z.full_name AS full_name_5
              FROM employee Z,
                   SELECT DISTINCT
                        A.supervisor_id_1,
                        A.employee_id_1,
                        A.full_name_1,
                        A.supervisor_id_2,
                        A.employee_id_2,
                        A.full_name_2,
                        A.supervisor_id_3,
                        A.employee_id_3,
                        A.full_name_3,
                        Z.supervisor_id AS supervisor_id_4,
                        Z.employee_id AS employee_id_4,
                        Z.full_name AS full_name_4
                   FROM employee Z,
                        SELECT DISTINCT
                             A.supervisor_id_1,
                             A.employee_id_1,
                             A.full_name_1,
                             A.supervisor_id_2,
                             A.employee_id_2,
                             A.full_name_2,
                             Z.supervisor_id AS supervisor_id_3,
                             Z.employee_id AS employee_id_3,
                             Z.full_name AS full_name_3
                        FROM employee Z,
                             SELECT DISTINCT
                                  A.supervisor_id_1,
                                  A.employee_id_1,
                                  A.full_name_1,
                                  Z.supervisor_id AS supervisor_id_2,
                                  Z.employee_id AS employee_id_2,
                                  Z.full_name AS full_name_2
                             FROM employee Z,
                                  SELECT DISTINCT
                                       supervisor_id AS supervisor_id_1,
                                       employee_id AS employee_id_1,
                                       full_name AS full_name_1
                                   FROM employee
                                   WHERE supervisor_id = 0 OR supervisor_id IS NULL
                             ) A
                             WHERE A.employee_id_1 = Z.supervisor_id
                        ) A
                        WHERE A.employee_id_2 = Z.supervisor_id
                   ) A
                   WHERE A.employee_id_3 = Z.supervisor_id
              ) A
              WHERE A.employee_id_4 = Z.supervisor_id
         ) A
         WHERE A.employee_id_5 = Z.supervisor_id
    ) A
    WHERE A.employee_id_6 = Z.supervisor_id
    UNION
    SELECT DISTINCT
         A.employee_id_6 AS employee_id,
         A.supervisor_id_1,
         A.employee_id_1,
         A.full_name_1,
         A.supervisor_id_2,
         A.employee_id_2,
         A.full_name_2,
         A.supervisor_id_3,
         A.employee_id_3,
         A.full_name_3,
         A.supervisor_id_4,
         A.employee_id_4,
         A.full_name_4,
         A.supervisor_id_5,
         A.employee_id_5,
         A.full_name_5,
         A.supervisor_id_6,
         A.employee_id_6,
         A.full_name_6,
         NULL AS supervisor_id_7,
         NULL AS employee_id_7,
         NULL AS full_name_7
    FROM employee Z,
         SELECT DISTINCT
              A.supervisor_id_1,
              A.employee_id_1,
              A.full_name_1,
              A.supervisor_id_2,
              A.employee_id_2,
              A.full_name_2,
              A.supervisor_id_3,
              A.employee_id_3,
              A.full_name_3,
              A.supervisor_id_4,
              A.employee_id_4,
              A.full_name_4,
              A.supervisor_id_5,
              A.employee_id_5,
              A.full_name_5,
              Z.supervisor_id AS supervisor_id_6,
              Z.employee_id AS employee_id_6,
              Z.full_name AS full_name_6
         FROM employee Z,
              SELECT DISTINCT
                   A.supervisor_id_1,
                   A.employee_id_1,
                   A.full_name_1,
                   A.supervisor_id_2,
                   A.employee_id_2,
                   A.full_name_2,
                   A.supervisor_id_3,
                   A.employee_id_3,
                   A.full_name_3,
                   A.supervisor_id_4,
                   A.employee_id_4,
                   A.full_name_4,
                   Z.supervisor_id AS supervisor_id_5,
                   Z.employee_id AS employee_id_5,
                   Z.full_name AS full_name_5
              FROM employee Z,
                   SELECT DISTINCT
                        A.supervisor_id_1,
                        A.employee_id_1,
                        A.full_name_1,
                        A.supervisor_id_2,
                        A.employee_id_2,
                        A.full_name_2,
                        A.supervisor_id_3,
                        A.employee_id_3,
                        A.full_name_3,
                        Z.supervisor_id AS supervisor_id_4,
                        Z.employee_id AS employee_id_4,
                        Z.full_name AS full_name_4
                   FROM employee Z,
                        SELECT DISTINCT
                             A.supervisor_id_1,
                             A.employee_id_1,
                             A.full_name_1,
                             A.supervisor_id_2,
                             A.employee_id_2,
                             A.full_name_2,
                             Z.supervisor_id AS supervisor_id_3,
                             Z.employee_id AS employee_id_3,
                             Z.full_name AS full_name_3
                        FROM employee Z,
                             SELECT DISTINCT
                                  A.supervisor_id_1,
                                  A.employee_id_1,
                                  A.full_name_1,
                                  Z.supervisor_id AS supervisor_id_2,
                                  Z.employee_id AS employee_id_2,
                                  Z.full_name AS full_name_2
                             FROM employee Z,
                                  SELECT DISTINCT
                                       supervisor_id AS supervisor_id_1,
                                       employee_id AS employee_id_1,
                                       full_name AS full_name_1
                                   FROM employee
                                   WHERE supervisor_id = 0 OR supervisor_id IS NULL
                             ) A
                             WHERE A.employee_id_1 = Z.supervisor_id
                        ) A
                        WHERE A.employee_id_2 = Z.supervisor_id
                   ) A
                   WHERE A.employee_id_3 = Z.supervisor_id
              ) A
              WHERE A.employee_id_4 = Z.supervisor_id
         ) A
         WHERE A.employee_id_5 = Z.supervisor_id
    ) A
    UNION
    SELECT DISTINCT
         A.employee_id_5 AS employee_id,
         A.supervisor_id_1,
         A.employee_id_1,
         A.full_name_1,
         A.supervisor_id_2,
         A.employee_id_2,
         A.full_name_2,
         A.supervisor_id_3,
         A.employee_id_3,
         A.full_name_3,
         A.supervisor_id_4,
         A.employee_id_4,
         A.full_name_4,
         A.supervisor_id_5,
         A.employee_id_5,
         A.full_name_5,
         NULL AS supervisor_id_6,
         NULL AS employee_id_6,
         NULL AS full_name_6,
         NULL AS supervisor_id_7,
         NULL AS employee_id_7,
         NULL AS full_name_7
    FROM employee Z,
         SELECT DISTINCT
              A.supervisor_id_1,
              A.employee_id_1,
              A.full_name_1,
              A.supervisor_id_2,
              A.employee_id_2,
              A.full_name_2,
              A.supervisor_id_3,
              A.employee_id_3,
              A.full_name_3,
              A.supervisor_id_4,
              A.employee_id_4,
              A.full_name_4,
              Z.supervisor_id AS supervisor_id_5,
              Z.employee_id AS employee_id_5,
              Z.full_name AS full_name_5
         FROM employee Z,
              SELECT DISTINCT
                   A.supervisor_id_1,
                   A.employee_id_1,
                   A.full_name_1,
                   A.supervisor_id_2,
                   A.employee_id_2,
                   A.full_name_2,
                   A.supervisor_id_3,
                   A.employee_id_3,
                   A.full_name_3,
                   Z.supervisor_id AS supervisor_id_4,
                   Z.employee_id AS employee_id_4,
                   Z.full_name AS full_name_4
              FROM employee Z,
                   SELECT DISTINCT
                        A.supervisor_id_1,
                        A.employee_id_1,
                        A.full_name_1,
                        A.supervisor_id_2,
                        A.employee_id_2,
                        A.full_name_2,
                        Z.supervisor_id AS supervisor_id_3,
                        Z.employee_id AS employee_id_3,
                        Z.full_name AS full_name_3
                   FROM employee Z,
                        SELECT DISTINCT
                             A.supervisor_id_1,
                             A.employee_id_1,
                             A.full_name_1,
                             Z.supervisor_id AS supervisor_id_2,
                             Z.employee_id AS employee_id_2,
                             Z.full_name AS full_name_2
                        FROM employee Z,
                             SELECT DISTINCT
                                  supervisor_id AS supervisor_id_1,
                                  employee_id AS employee_id_1,
                                  full_name AS full_name_1
                              FROM employee
                              WHERE supervisor_id = 0 OR supervisor_id IS NULL
                        ) A
                        WHERE A.employee_id_1 = Z.supervisor_id
                   ) A
                   WHERE A.employee_id_2 = Z.supervisor_id
              ) A
              WHERE A.employee_id_3 = Z.supervisor_id
         ) A
         WHERE A.employee_id_4 = Z.supervisor_id
    ) A
    UNION
    SELECT DISTINCT
         A.employee_id_4 AS employee_id,
         A.supervisor_id_1,
         A.employee_id_1,
         A.full_name_1,
         A.supervisor_id_2,
         A.employee_id_2,
         A.full_name_2,
         A.supervisor_id_3,
         A.employee_id_3,
         A.full_name_3,
         A.supervisor_id_4,
         A.employee_id_4,
         A.full_name_4,
         NULL AS supervisor_id_5,
         NULL AS employee_id_5,
         NULL AS full_name_5,
         NULL AS supervisor_id_6,
         NULL AS employee_id_6,
         NULL AS full_name_6,
         NULL AS supervisor_id_7,
         NULL AS employee_id_7,
         NULL AS full_name_7
    FROM employee Z,
         SELECT DISTINCT
              A.supervisor_id_1,
              A.employee_id_1,
              A.full_name_1,
              A.supervisor_id_2,
              A.employee_id_2,
              A.full_name_2,
              A.supervisor_id_3,
              A.employee_id_3,
              A.full_name_3,
              Z.supervisor_id AS supervisor_id_4,
              Z.employee_id AS employee_id_4,
              Z.full_name AS full_name_4
         FROM employee Z,
              SELECT DISTINCT
                   A.supervisor_id_1,
                   A.employee_id_1,
                   A.full_name_1,
                   A.supervisor_id_2,
                   A.employee_id_2,
                   A.full_name_2,
                   Z.supervisor_id AS supervisor_id_3,
                   Z.employee_id AS employee_id_3,
                   Z.full_name AS full_name_3
              FROM employee Z,
                   SELECT DISTINCT
                        A.supervisor_id_1,
                        A.employee_id_1,
                        A.full_name_1,
                        Z.supervisor_id AS supervisor_id_2,
                        Z.employee_id AS employee_id_2,
                        Z.full_name AS full_name_2
                   FROM employee Z,
                        SELECT DISTINCT
                             supervisor_id AS supervisor_id_1,
                             employee_id AS employee_id_1,
                             full_name AS full_name_1
                         FROM employee
                         WHERE supervisor_id = 0 OR supervisor_id IS NULL
                   ) A
                   WHERE A.employee_id_1 = Z.supervisor_id
              ) A
              WHERE A.employee_id_2 = Z.supervisor_id
         ) A
         WHERE A.employee_id_3 = Z.supervisor_id
    ) A
    UNION
    SELECT DISTINCT
         A.employee_id_3 AS employee_id,
         A.supervisor_id_1,
         A.employee_id_1,
         A.full_name_1,
         A.supervisor_id_2,
         A.employee_id_2,
         A.full_name_2,
         A.supervisor_id_3,
         A.employee_id_3,
         A.full_name_3,
         NULL AS supervisor_id_4,
         NULL AS employee_id_4,
         NULL AS full_name_4,
         NULL AS supervisor_id_5,
         NULL AS employee_id_5,
         NULL AS full_name_5,
         NULL AS supervisor_id_6,
         NULL AS employee_id_6,
         NULL AS full_name_6,
         NULL AS supervisor_id_7,
         NULL AS employee_id_7,
         NULL AS full_name_7
    FROM employee Z,
         SELECT DISTINCT
              A.supervisor_id_1,
              A.employee_id_1,
              A.full_name_1,
              A.supervisor_id_2,
              A.employee_id_2,
              A.full_name_2,
              Z.supervisor_id AS supervisor_id_3,
              Z.employee_id AS employee_id_3,
              Z.full_name AS full_name_3
         FROM employee Z,
              SELECT DISTINCT
                   A.supervisor_id_1,
                   A.employee_id_1,
                   A.full_name_1,
                   Z.supervisor_id AS supervisor_id_2,
                   Z.employee_id AS employee_id_2,
                   Z.full_name AS full_name_2
              FROM employee Z,
                   SELECT DISTINCT
                        supervisor_id AS supervisor_id_1,
                        employee_id AS employee_id_1,
                        full_name AS full_name_1
                    FROM employee
                    WHERE supervisor_id = 0 OR supervisor_id IS NULL
              ) A
              WHERE A.employee_id_1 = Z.supervisor_id
         ) A
         WHERE A.employee_id_2 = Z.supervisor_id
    ) A
    UNION
    SELECT DISTINCT
         A.employee_id_2 AS employee_id,
         A.supervisor_id_1,
         A.employee_id_1,
         A.full_name_1,
         A.supervisor_id_2,
         A.employee_id_2,
         A.full_name_2,
         NULL AS supervisor_id_3,
         NULL AS employee_id_3,
         NULL AS full_name_3,
         NULL AS supervisor_id_4,
         NULL AS employee_id_4,
         NULL AS full_name_4,
         NULL AS supervisor_id_5,
         NULL AS employee_id_5,
         NULL AS full_name_5,
         NULL AS supervisor_id_6,
         NULL AS employee_id_6,
         NULL AS full_name_6,
         NULL AS supervisor_id_7,
         NULL AS employee_id_7,
         NULL AS full_name_7
    FROM employee Z,
         SELECT DISTINCT
              A.supervisor_id_1,
              A.employee_id_1,
              A.full_name_1,
              Z.supervisor_id AS supervisor_id_2,
              Z.employee_id AS employee_id_2,
              Z.full_name AS full_name_2
         FROM employee Z,
              SELECT DISTINCT
                   supervisor_id AS supervisor_id_1,
                   employee_id AS employee_id_1,
                   full_name AS full_name_1
               FROM employee
               WHERE supervisor_id = 0 OR supervisor_id IS NULL
         ) A
         WHERE A.employee_id_1 = Z.supervisor_id
    ) A
    UNION
    SELECT DISTINCT
         A.employee_id_1 AS employee_id,
         A.supervisor_id_1,
         A.employee_id_1,
         A.full_name_1,
         NULL AS supervisor_id_2,
         NULL AS employee_id_2,
         NULL AS full_name_2,
         NULL AS supervisor_id_3,
         NULL AS employee_id_3,
         NULL AS full_name_3,
         NULL AS supervisor_id_4,
         NULL AS employee_id_4,
         NULL AS full_name_4,
         NULL AS supervisor_id_5,
         NULL AS employee_id_5,
         NULL AS full_name_5,
         NULL AS supervisor_id_6,
         NULL AS employee_id_6,
         NULL AS full_name_6,
         NULL AS supervisor_id_7,
         NULL AS employee_id_7,
         NULL AS full_name_7
    FROM employee Z,
         SELECT DISTINCT
              supervisor_id AS supervisor_id_1,
              employee_id AS employee_id_1,
              full_name AS full_name_1
          FROM employee
          WHERE supervisor_id = 0 OR supervisor_id IS NULL
    ) A

  • Parent child deletion  in ODI

    Hi ,
    I am using ODI for data migration.
    I have created interface for that . i have done error handling . now i need to implement parent child deletion. that is i need to delete parent record if the child record is no there for a particular Policy. can any one help me in implementing this in ODI.

    Can you please provide me the steps/document for exception handling in ODI interfaces.. I am creating interfaces to load flat files into custom tables and I need to provide exception handling in each interface. I would appreciate.
    Thanks
    Ram

  • Parent-Child Unbound Transformation from Linear Structure

    Hi ,
    We need to convert the linear people structure into Parent-Child relation with unbounded depth using XQuery. To give in detail, we have the XML schema as
    <?xml version="1.0" encoding="UTF-8"?>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.org/ParentChild" xmlns:tns="http://www.example.org/ParentChild" elementFormDefault="qualified">
    <complexType name="People">
    <sequence>
    <element name="id" type="string" />
    <element name="name" type="string" />
    <element name="age" type="string" />
    <element name="parentId" type="string" minOccurs="0" />
    </sequence>
    </complexType>
    <complexType name="Peoples">
    <sequence>
    <element name="people" type="tns:People" maxOccurs="unbounded"></element>
    </sequence>
    </complexType>
    <element name="Peoples" type="tns:Peoples"></element>
    <element name="People" type="tns:People"></element>
    <complexType name="Parent">
    <sequence>
    <element name="id" type="string" />
    <element name="name" type="string" />
    <element name="age" type="string" />
    <element name="child" type="tns:Parent" minOccurs="0" maxOccurs="unbounded" />
    </sequence>
    </complexType>
    <complexType name="Parents">
    <sequence>
    <element name="Parent" type="tns:Parent" maxOccurs="unbounded" ></element>
    </sequence>
    </complexType>
    <element name="Parents" type="tns:Parents"></element>
    <element name="Parent" type="tns:Parent"></element>
    </schema>
    The input structure can appear as
    <?xml version="1.0"?>
    <ns0:Peoples xmlns:ns0="http://www.example.org/ParentChild">
    <ns0:people>
    <ns0:id>1</ns0:id>
    <ns0:name>x</ns0:name>
    <ns0:age>11</ns0:age>
    <ns0:parentId>2</ns0:parentId>
    </ns0:people>
    <ns0:people>
    <ns0:id>2</ns0:id>
    <ns0:name>y</ns0:name>
    <ns0:age>11</ns0:age>
    <ns0:parentId>3</ns0:parentId>
    </ns0:people>
    <ns0:people>
    <ns0:id>3</ns0:id>
    <ns0:name>z</ns0:name>
    <ns0:age>11</ns0:age>
    </ns0:people>
    <ns0:people>
    <ns0:id>5</ns0:id>
    <ns0:name>a</ns0:name>
    <ns0:age>11</ns0:age>
    </ns0:people>
    </ns0:Peoples>
    The response should be like below
    <?xml version="1.0"?>
    <ns0:Parents xmlns:ns0="http://www.example.org/ParentChild">
    <ns0:Parent>
    <ns0:id>3</ns0:id>
    <ns0:name>z</ns0:name>
    <ns0:age>11</ns0:age>
    <ns0:child>
    <ns0:id>2</ns0:id>
    <ns0:name>y</ns0:name>
    <ns0:age>11</ns0:age>
    <ns0:child>
    <ns0:id>1</ns0:id>
    <ns0:name>x</ns0:name>
    <ns0:age>11</ns0:age>
    </ns0:child>
    </ns0:child>
    </ns0:Parent>
    <ns0:Parent>
    <ns0:id>5</ns0:id>
    <ns0:name>a</ns0:name>
    <ns0:age>11</ns0:age>
    </ns0:Parent>
    </ns0:Parents>
    We tried with below XQuery, but it is not resulting as expected.
    (:: pragma bea:global-element-parameter parameter="$peoples" element="ns0:Peoples" location="ParentChild.xsd" ::)
    (:: pragma bea:global-element-return element="ns0:Parents" location="ParentChild.xsd" ::)
    declare namespace ns0 = "http://www.example.org/ParentChild";
    declare namespace xf = "http://tempuri.org/RecursiveParentChild/ParentChild/";
    declare function xf:ParentChild($peoples as element(ns0:Peoples))
    as element(ns0:Parents) {
    <ns0:Parents>
    let $results := <a>{
         for $people1 in $peoples/ns0:people where (not (exists ($people1/*:parentId)))
         return
         <ns0:Parent>
                                  <ns0:id>{ data($people1/ns0:id) }</ns0:id>
                        <ns0:name>{ data($people1/ns0:name) }</ns0:name>
                        <ns0:age>{ data($people1/ns0:age) }</ns0:age>
                             </ns0:Parent>
                   </a>
                   let $result1 :=
                   for $people1 in $peoples/ns0:people where (exists ($people1/*:parentId))
                   return
                        if (data($people1/ns0:parentId) = data($results/ns0:id)) then
                             <ns0:child>
                                  $people1/*
                             </ns0:child>
                        else()
                   return $result1      
    </ns0:Parents>
    declare variable $peoples as element(ns0:Peoples) external;
    xf:ParentChild($peoples)
    Anyone tried similar kind of XQuery?. THere is a possibility that the child node can appear before the parent node, how we can handle that as well?
    Any help on this is appreciated
    Regards
    Venkata Madhu

    You need a recursive function in this situation :
    declare namespace ns0 = "http://www.example.org/ParentChild";
    declare namespace xf = "http://tempuri.org/RecursiveParentChild/ParentChild/";
    declare variable $peoples as element(ns0:Peoples) external;
    declare function xf:getChildren($p as element(ns0:people)) as element(ns0:child)*
      for $c in $peoples/ns0:people[ns0:parentId=$p/ns0:id]
      return <ns0:child>
            <ns0:id>{ data($p/ns0:id) }</ns0:id>
            <ns0:name>{ data($c/ns0:name) }</ns0:name>
            <ns0:age>{ data($p/ns0:age) }</ns0:age>
            { xf:getChildren($c) }
             </ns0:child>
    <ns0:Parents>
      for $p in $peoples/ns0:people[not(ns0:parentId)]
      return <ns0:Parent>
            <ns0:id>{ data($p/ns0:id) }</ns0:id>
            <ns0:name>{ data($p/ns0:name) }</ns0:name>
            <ns0:age>{ data($p/ns0:age) }</ns0:age>
            { xf:getChildren($p) }
             </ns0:Parent>
    </ns0:Parents>

  • Parent/child accounts in bc

    Hey Forum
    Wondering if its possible to setup a parent/child relationship with customer accounts. For example, Let's say I have company A that is a dealer. That dealer may submit forms and such and I would like to associate three accounts under that dealer so the different accounts can see the other forms or information for that dealer. Is this possible with bc?
    I'm fairly new and getting handle on this platform but have to say its growing on me.
    Thanks!
    Derek

    Derek, Not out of the box, if you really wanted to do this and stick with BC you could sync BC's CRM databases externally using the API and build the functionality off BC but utilizing BC as the database.

  • Parent child tables - how to maintain RI

    Here is my scenario:
    In our model, we have parent child relationship between tables.
    We are not sure how the parent tables are populated. If incremental update, it should be fine (assuming if needed rows will be inserted in the child table manually). If the tables are truncated and data is inserted again – that might be a problem since there exist relationship with child tables. What are the various options for handling such cases?
    Option1: cascade delete
    Option 2: ...?

    I'm not sure I understand the goal here...
    - Are you trying to design a data model? If so, wouldn't the business and data requirements tell you whether you need to truncate and reload the parent table or whether you can do an incremental load? It wouldn't seem to make sense to design a data model with no understanding of how the model is going to be used.
    - Are you trying to design a load process that works with an existing data model? If so, are you trying to design an incremental load? Or a load that involves a truncate and reload? Does the existing data model have foreign key constraints?
    Specifying the Oracle version and a bit of information about the application (i.e. is this an OLTP application, a data warehouse, something else) would probably also be helpful.
    Justin

  • Parent Child Data - Populate within a Dropdown

    Hi All ...
    I have a mysql database with the following fields
    ID (Int) - Title (VarChar) - ParentID (Int)
    This table is used to display categories with it's parent.  Categories with the ParentID of 0 means that it is a root category.
    What'm trying to do is query the database and populate all values (with it's parent & child(s)) within a regular html dropdown box.
    So the output of the dropdown whould look like:
    Home
    Home > Sub Cat 1
    Home > Sub Cat 1 > Sub Sub Cat 1
    Home > Sub Cat 1 > Sub Sub Cat 2
    Home > Sub Cat 1 > Sub Sub Cat 3
    Home > Sub Cat 2 > Sub Sub Cat 1
    Home > Sub Cat 2 > Sub Sub Cat 2
    Home > Sub Cat 3
    Home > Sub Cat 4
    Home > Sub Cat 4 > Sub Sub Cat 1
    Home > Sub Cat 5
    Any ideas on how I can accomplish this?
    Many Thanks
    Shafiq

    As far as I know you cannot elegantly handle this sort of datastructure in MySQL (this is based on 5min of googling).  If you had Oracle you could use CONNECT BY PRIOR, and with SQL Server one can use Common Table Expressions to effect much the same thing (except in a pretty clunky fashion, IMO).
    As far as I can tell, MySQL has neither of those options.  You'll need to do some sort of horrific recursive proc, or something like that.  Although I saw references to MySQL not even being able to do that (I didn't check how contemporary those comments were).
    If you can possibly ditch that way of modelling your data - it really doesn't scale so well - have a look at nested set hierarchies:
    http://en.wikipedia.org/wiki/Nested_set_model
    The only modification I make to that is to store the parent with each node too, which makes sibling operations much easier.  Nested sets work really well with hierarchical look-ups though.
    Adam

  • Do the custom rollup member formulas work recursively for parent child dimension?

    Hi
    We have custom rollup set up for Account dimension which is parent child.
    It seems to work fine when the custom member formula refers to a base account member i.e. if the formula for MemberKey4 is (MemberKey1 + MemberKey2) then it shows the sum of the underlying members 1 and 2.
    But if the formula for MemberKey10 is (MemberKey3 + MemberKey4) then it should evaluate the value for MemberKey4 first and then add to it value for MemberKey3 to come up with final number for MemberKey10.
    Do the custom rollup work fine with the recursive calculations? Is this recursion limited to some level?
    Thanks
    Shailesh

    Hi Jorg,
    Thanks for your input.
    Actually the hierarhcy is more determined by the parent child relationship. So we cannot move the members as per the formula. And further the formulas are not always additive, there are divisions and multiplactions happening also.
    Further the calculated members (account members) are used in different places, the usage level of calculated members could be 3 in some cases i.e. MemberKey15 = (calculated using MemberKey10 = (calculated using MemberKey7 = (Calculated using MemberKey4 = (calculated using base members)))). Now inserting the base members in place of a calcuated member becomes more of string manipulation.
    And on the top of above complexity, the formulas are not static and they are more user defined, they may change between time periods, which forces us to write a dynamic procedure to translate the 'business formula' into SSAS formula. We expect the custom rollup to work as expected (i.e. if the formula contains a calculation involving the calculated member, it should resolve that first and so on) and we have written generic procedure to replace the Account Code in the 'business formula' with the accont key value with the account hierarchy char string.
    In the link http://doc.ddart.net/mssql/sql2000/html/olapdmad/agmdxadvanced_6jn7.htm for AS2000, it talks about the calculation pass deapth, it says:
    .......If a cube has custom rollup formulas or custom rollup operators, a second calculation pass is performed to handle the computations needed to calculate these features.......
    Now from the above, it is obvious that the OLAP engine will automatically go into recursion if the formula contains a cacluated member and it knows that the calculated member has to be resolved first before calculating the final formula result. The above article also talks about 'Calculation Pass Number' property in the AdvanceCube Editor (AS2000), which can be set to the value depending on the expected number of passes required in a given scenario. I don't find such an equivalent peoperty for SSAS 2005.
    Would anybody please throw some more ideas / insights on this issue?
    Jorg, thanks  again for your input...
    Shailesh

  • EJB 3, OneToMany that Acts As Tree, or Parent Child relationship support?

    (Sorry for the RoR reference)
    I first searched the forum and found this post that came close, but not exactly what I'm needing since my table doesn't reference the PK:
    http://forum.java.sun.com/thread.jspa?forumID=13&threadID=767913
    I have a table called Folder that represents a folder hierarchy. It has a 'Path' field and a 'Parent' field, and of course 'ID'. Each Folder knows its parent by the 'Parent' field, which references 'Path', not* 'ID'. Both are Strings.
    To find all the children of a Folder, the sql for a PreparedStatment might look something like this (shared for clarity of the situation):
    SELECT * FROM Folder
    WHERE Parent = ?Question:
    What are the proper annotations in EJB 3 / JPA to allow this kind non-primary key parent/child relationship mapping?
    Can I specify a named query that handles the logic and then reference it in the OneToMany annotation? Other cool tricks?
    Here is what I am trying (no runtime errors, but no results either). (Example simplified)
    @Entity
    @Table(name = "Folder")
    @NamedQueries(value = {@NamedQuery(.......)})
    public class Folder implements Serializable {
        @Id
        @Column(name = "ID", nullable = false, updatable = false)
        private Integer folderID;
        @Column(name = "Path", nullable = false)
        private String path;
        @Column(name = "Parent")
        private String parent;
        // v Here's the kicker v
        @OneToMany(cascade={CascadeType.ALL}, fetch=FetchType.EAGER)
        @JoinTable(name="Folder",
            joinColumns={@JoinColumn(name="Parent")},
            inverseJoinColumns={@JoinColumn(name="Path")})
        private List<Folder> children;
        // getters and setters ....
    }Thanks!

    It looks like the relationship is bi-directional.
    Will this work...
    // Parent.java
    @Entity
    public class Parent implements java.io.Serializable {
    @Id
    public Long parentId;
    @OneToMany(cascade=CascadeType.PERSIST,mappedBy="parent")
    public Collection<Child> children;
    // Child.java
    @Entity
    public class Child implements java.io.Serializable {
    @Id
    public Long childId;
    @ManyToOne
    public Parent parent;  // target of mappedBy
    }Then, in your code (a session facade?), you'll create the parent first, create the children, then add the children to the parent. Your code is also responsible for maintaining the reference back to the parent.
    Parent p = new Parent();
    for(int i=0; i<10; i++) {
      Child c = new Child();
      p.children.add(c);
      c.parent = p;
    em.persist(p);

  • Parent Child Form

    How can i show the form in parent child style
    B1 SDK?? It just like the form handling in .NET

    Parent/Child (Aka Modal forms) forms can't be done in SDK at the moment... Modal forms have been promised for some time now and latest is promised in the SBO2006A..
    If you need to do it, the best way is to save a parent forms uid in the child form (in a userdatasource). That way you will always have control of the parent form and if it is closed, you can give a good error message.

Maybe you are looking for