Programmatic, using bean add Parent and child nodes in af:tree dynamically

Hi All,
i have to add parent and child nodes dynamically in tree .
Example :
i have created a tree like below.On click of button i will get value A ,from pl/sql function i will A1 and A 2 values.which i have to show in pop as tree.
A
|-----A1
|-----A2
If user clicks on A2.I have to catch A2 value and pass to pl/sql function which gives A2.01 and A2.02 values.
A
|-----A1
|-----A2
|------A2.01
|------A2.02.
A, A1 ,A2,A2.01 ...........values comes from pl/sql funchtion .
thanks in advance ......... any suggestion will greatly helps

no use ......................

Similar Messages

  • How to differentiate parent and child node in af:treeTable ?

    Greetings,
    I have a requirement, I display master child view objects using <af:treeTable> component, When user expands a parent row, I have to make parent row is in read only and expanded(child) row in editable. To accomplish this I have to identify the 'node' whether it belongs to parent or child view object. In this example Tree table binds with EmpVO, There is a view link beteween EmpVO and DepartmentVO.
    <af:treeTable value="#{bindings.EmpVO.treeModel}"
    var="node"
    rowSelection="single" id="tEqSum"
    summary="Employee Summary"
    <af:column sortProperty="#{bindings.EmpVO.hints.LocCity.name}"
    filterable="true" sortable="true" width="90"
    headerText="#{bindings.EmpVO.hints.LocCity.label}"
    id="c3">
    <af:outputText value="#{node.LocCity}" id="ot21"/>
    expandAllEnabled="false">
    </af:treeTable>
    Thanks in Advance,

    Hi,
    You can find out the node depth by using
    #{bindings.<your_tree_binding>.treeModel.depth}Based on the depth, you can decide whether its a parent node or child node (for a 1 level tree- say dept and emp, the depth for parent would be 0 and for the child it would be 1).
    -Arun

  • Problem while handling Parent and child nodes in CE

    Hi all
    I am facing a problem with handling Child and Parent nodes in CE.
    I have a Table in which I have drop downs. On selecting a value in the drop down, I have to take that value and do some action.
    I am trying to access the value in the following ways
    wdContext.nodeParent().currentParentElement().nodeChild().currentChildElement().getVaActivity();
    wdContext.nodeChild ().currentChildElement().getVaActivity();
    When I select the drop down from the first row of the Table the code works fine.
    But when I select other rows, it returns the current value of the first row.
    The lead selection of the parent always returns u20180u2019 even though you have done some action in row 2,3 etc.
    The same code gives the required values in EP 7.0; I.e.: it returns the values form selected row in the table.
    Basic problem is that the current value of parent always returns the first row.
    Following are the Properties of the nodes
    Parent
    Collection Cardinality: 0-n
    Singletone: true
    Child:
    Collection Cardinality: 0-n
    Singletone: false
    Please help
    Regards
    Deepu

    Hi,
       In CE changing dropdown selections doesn't fire table leadselection events. If you want to use a dropdown in a context-driven UI element like a Table, you need to use of event parameter mappings. So here are the steps:
    1. Create a new action for the onSelect event of the dropdown (I will write the code for DropDownByIndex), let's call it Select.
    2. Add a parameter parentElement whose type is same as the type of the parent node element. So from your example it would be IParentElement. Select the chek-box for "Adapt event-handler parameter". This will add a new parameter to the event-handler method onActionSelect called parentElement.
    3. Write this inside wdDoModifyView :
    if (firstTime) {
        IWDAbstractDropDownByIndex ddi = (IWDAbstractDropDownByIndex) view.getElement("<id of DropDownByIndex>");
        ddi.mappingOfOnSelect().addSourceMapping(IWDAbstractDropDownByIndex.IWDOnSelect.NODE_ELEMENT,"parentElement");
    3. If you want to set the lead selection of the table to the row where the dropdown is write this inside the event-handler:
    wdContext.nodeParent().setLeadSelection(parentElement.index()); //parentElement is the event handler parameter added through the action.
    Note that the event parameter IWDOnSelect.NODE_ELEMENT points to the node element that defines the data mapping for the containing row and not the node element of the source for the dropdown. This has been specfically  added for such a scenario. All this is well documented [here|http://help.sap.com/javadocs/nwce/current/wdr/com/sap/tc/webdynpro/clientserver/uielib/standard/api/IWDAbstractDropDownByIndex.IWDOnSelect.html#NODE_ELEMENT].
    Regards,
    Satyajit.

  • Don't see parent and child nodes in tree control with switcher, enclose xml

    Hi, i.m a novice for jdev 11.1.1.2,
    i need to create a tree menu, but when i put the switcher + n°2 face whith link object, inside the tree and
    run my application i don't see the node, but i see the bookmarks that collapease and expand Why ????
    Thanks for your help
    Gio
    enclose xml for better clarification:
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document id="d1">
    <af:messages id="m1"/>
    <af:form id="f1">
    <af:panelStretchLayout id="psl1">
    <f:facet name="center">
    <af:panelGroupLayout layout="scroll"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
    id="pgl4">
    <af:panelSplitter id="ps1" splitterPosition="156"
    inlineStyle="width:534px;">
    <f:facet name="first">
    <af:panelGroupLayout layout="scroll"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
    id="pgl3">
    <af:panelHeader text="panelHeader 1" id="ph1">
    <f:facet name="context"/>
    <f:facet name="menuBar"/>
    <f:facet name="toolbar"/>
    <f:facet name="legend"/>
    <f:facet name="info"/>
    <af:tree value="#{bindings.DepartmentsViewTree.treeModel}"
    selectionListener="#{bindings.DepartmentsViewTree.treeModel.makeCurrent}"
    rowSelection="single" id="t1" var="node">
    <f:facet name="nodeStamp">
    <af:switcher id="s1"
    facetName="#{node.hierType.viewDefName}">
    <f:facet name="DepartmentsView">
    <af:panelGroupLayout id="pgl1">
    <af:commandLink text="#{node}"
    action="#{MainPageBean.departmentRegionLayout}"
    id="cl1">
    <af:setActionListener from="#{node.DepartmentId}"
    to="#{pageFlowScope.TreeKey}"/>
    </af:commandLink>
    <af:commandLink text=" (Edit)"
    action="createEdit" id="cl2">
    <af:setActionListener from="#{node.DepartmentId}"
    to="#{pageFlowScope.DeptTreeKey}"/>
    </af:commandLink>
    </af:panelGroupLayout>
    </f:facet>
    <f:facet name="EmployeesView">
    <af:commandLink text="#{node}"
    action="#{MainPageBean.employeeRegionLayout}"
    id="cl3">
    <af:setActionListener from="#{node.EmployeeId}"
    to="#{pageFlowScope.TreeKey}"/>
    </af:commandLink>
    </f:facet>
    </af:switcher>
    </f:facet>
    </af:tree>
    </af:panelHeader>
    </af:panelGroupLayout>
    </f:facet>
    <f:facet name="second">
    <af:panelGroupLayout layout="scroll"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
    id="pgl2">
    <af:region value="#{bindings.dynamicRegion1.regionModel}"
    id="dynam1" partialTriggers="::t1"/>
    </af:panelGroupLayout>
    </f:facet>
    </af:panelSplitter>
    </af:panelGroupLayout>
    <!-- id="af_one_column_stretched" -->
    </f:facet>
    </af:panelStretchLayout>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>
    Edited by: user595664 on 5-dic-2009 2.54
    Edited by: user595664 on 5-dic-2009 2.57

    Hi,
    you need to provide the full naming for the facet names. So instead of DepartmentsView you provide mypackage.DepartmentsView where you replace mypackage with the package structure of the the ViewObject
    Frank

  • Is it possible to put two different colors in tree parent node background and child nodes background?

    Is it possible to put two different colors in tree parent
    node background and child nodes background?
    Any help will be very helpful.
    Thanks

    Hi PanosE,
    Yes, you can set up another Standard Edition Server in child domain and then deploy pool pairing.
    You need to deploy a new Front End Pool for the new Standard Edition Server.
    A similar case for your reference.
    https://social.technet.microsoft.com/Forums/office/en-US/eca4299c-8edb-481e-b328-c7deba2a79ba/lync-2013-standard-edition-lync-fe-pools-in-multiple-domain-single-forest-senario?forum=lyncdeploy
    Best regards,
    Eric
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • How to use Opendoc to link parent and child

    I have parent and child reports, I want to link them. When I click parent id then it should display child report.
    How to use Opendoc for this?
    Thanks,
    Charita

    You can use openDoc selection variable method for link the reports.
    Refer this link
    http://book.soundonair.ru/sams/ch31lev1sec2.html#PLID2

  • Extract parent and child data from an XML sequence?

    I'm very new to XML, so please excuse me if I use incorrect terminology here. I've been given a schema definition (.xsd), and several sample xml files from which I need to extract data and insert it into relational tables. I've made some progress in that I've been able to hack enough to modify and register the schema and get the XML into the database both through the registered schema and into a separate table with an XMLType column. I've also been able to use the isSchemaValid function to validate the XML against the schema definition, and I've been able to extract some of the simple data elements via the extractValue function. My problem is with extracting some of the nested data - that is, extracting parent node elements and child node elements together where there is more than one value in the child node. BTW. I'm on Oracle 10gR2.
    Following are the .xsd and and sample XML. Specifically, I need to select the NPI value from the PROVIDER node, and associate it with each of the CODE values from the SPECIALTIES node (which is part of the PROVIDER node).
    Here's the .xsd (sorry, it's very long). The only modifications I've made to the schema definition are to add the xdb namespace and the "xdb:defaultTable="HMOSCHEMA" snippet:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xdb="http://xmlns.oracle.com/xdb" version="1.0">
    <xsd:element name="HMO" xdb:defaultTable="HMOSCHEMA">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element ref="HMO_GENERAL_INFORMATION" />
    <xsd:element ref="PROVIDERS" />
    <xsd:element ref="FACILITIES" minOccurs="0"
    maxOccurs="1" />
    </xsd:sequence>
    <xsd:attribute name="DATE" type="xsd:string" />
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="HMO_GENERAL_INFORMATION">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element ref="MCO_ID_LIST" minOccurs="1" maxOccurs="1" />
    <xsd:element ref="HMO_WEBSITE_ADDRESS" minOccurs="1"
    maxOccurs="1" />
    <xsd:element ref="HMO_SPECIAL_SERVICES" minOccurs="0"
    maxOccurs="1" />
    <xsd:element ref="HMO_DAILY_CONTACT_EMAIL_ADDRESS"
    minOccurs="1" maxOccurs="1" />
    <xsd:element ref="HMO_MONTHLY_CONTACT_EMAIL_ADDRESS"
    minOccurs="1" maxOccurs="1" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="PROVIDERS">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element maxOccurs="unbounded" ref="PROVIDER" />
    </xsd:sequence>
    <xsd:attribute name="RECORDS" type="xsd:string" />
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="PROVIDER">
    <xsd:complexType>
    <xsd:sequence minOccurs="1" maxOccurs="unbounded">
    <xsd:element ref="NPI" minOccurs="1" maxOccurs="1" />
    <xsd:element ref="FIRST_NAME" minOccurs="1"
    maxOccurs="1" />
    <xsd:element ref="LAST_NAME" minOccurs="1"
    maxOccurs="1" />
    <xsd:element ref="MIDDLE_INITIAL" minOccurs="0"
    maxOccurs="1" />
    <xsd:element ref="GENDER" minOccurs="1" maxOccurs="1" />
    <xsd:element ref="LINE_1_ADDRESS" minOccurs="1"
    maxOccurs="1" />
    <xsd:element ref="LINE_2_ADDRESS" minOccurs="0"
    maxOccurs="1" />
    <xsd:element ref="CITY" minOccurs="1" maxOccurs="1" />
    <xsd:element ref="STATE" minOccurs="1" maxOccurs="1" />
    <xsd:element ref="ZIP" minOccurs="1" maxOccurs="1" />
    <xsd:element ref="COUNTY" minOccurs="0" maxOccurs="1" />
    <xsd:element ref="PHONE_NUMBER" minOccurs="1"
    maxOccurs="1" />
    <xsd:element ref="CLINIC_NAME" minOccurs="0"
    maxOccurs="1" />
    <xsd:element ref="CLINIC_TYPE" minOccurs="0"
    maxOccurs="1" />
    <xsd:element ref="CLINIC_NPI" minOccurs="0"
    maxOccurs="1" />
    <xsd:element ref="PROVIDER_OFFICE_HOURS_TENTHS"
    minOccurs="0" maxOccurs="1" />
    <xsd:element ref="MAXIMUM_PATIENTS" minOccurs="0"
    maxOccurs="1" />
    <xsd:element ref="ACCEPT_NEW_PATIENT" minOccurs="0"
    maxOccurs="1" />
    <xsd:element ref="PRIMARY_CARE_INDICATOR" minOccurs="0"
    maxOccurs="1" />
    <xsd:element ref="FOREIGN_LANGUAGES" minOccurs="0"
    maxOccurs="1" />
    <xsd:element ref="SPECIALTIES" minOccurs="1"
    maxOccurs="1" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="SPECIALTIES">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element maxOccurs="unbounded" name="CODE"
    minOccurs="1">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:pattern value="[0-9]{3}" />
    <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="FACILITIES">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element maxOccurs="unbounded" ref="FACILITY_NUM"
    minOccurs="0" />
    </xsd:sequence>
    <xsd:attribute name="RECORDS" type="xsd:string" />
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="FOREIGN_LANGUAGES">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element maxOccurs="unbounded" name="CODE"
    minOccurs="0">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:pattern value="[A-Z]{3}" />
    <xsd:pattern value="[a-z]{3}" />
    <xsd:pattern value="" />
    <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="HMO_SPECIAL_SERVICES">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element maxOccurs="unbounded" name="CODE"
    minOccurs="0">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:pattern value="[0-9]{2}" />
    <xsd:pattern value="" />
    <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="MCO_ID_LIST">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="MCO_ID" minOccurs="1" maxOccurs="unbounded">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:pattern value="[0-9]{1}" />
    <xsd:pattern value="[0-9]{2}" />
    <xsd:pattern value="[0-9]{3}" />
    <xsd:pattern value="[0-9]{4}" />
    <xsd:pattern value="[0-9]{5}" />
    <xsd:pattern value="[0-9]{6}" />
    <xsd:pattern value="[0-9]{7}" />
    <xsd:pattern value="[0-9]{8}" />
    <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="HMO_WEBSITE_ADDRESS">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:minLength value="1" />
    <xsd:maxLength value="100" />
    <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="HMO_DAILY_CONTACT_EMAIL_ADDRESS">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:minLength value="1" />
    <xsd:maxLength value="50" />
    <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="HMO_MONTHLY_CONTACT_EMAIL_ADDRESS">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:minLength value="1" />
    <xsd:maxLength value="50" />
    <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="NPI">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:pattern value="[0-9]{1}" />
    <xsd:pattern value="[0-9]{2}" />
    <xsd:pattern value="[0-9]{3}" />
    <xsd:pattern value="[0-9]{4}" />
    <xsd:pattern value="[0-9]{5}" />
    <xsd:pattern value="[0-9]{6}" />
    <xsd:pattern value="[0-9]{7}" />
    <xsd:pattern value="[0-9]{8}" />
    <xsd:pattern value="[0-9]{9}" />
    <xsd:pattern value="[0-9]{10}" />
    <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="FIRST_NAME">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:minLength value="1" />
    <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="LAST_NAME">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:minLength value="1" />
    <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="MIDDLE_INITIAL">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:minLength value="0" />
    <xsd:maxLength value="1" />
    <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="GENDER">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:minLength value="0" />
    <xsd:maxLength value="1" />
    <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="LINE_1_ADDRESS">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:minLength value="1" />
    <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="LINE_2_ADDRESS">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:minLength value="0" />
    <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="CITY">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:minLength value="1" />
    <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="STATE">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:pattern value="[a-zA-Z][a-zA-Z]" />
    <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="ZIP">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:pattern value="[0-9]{5}" />
    <xsd:pattern value="[0-9]{9}" />
    <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="COUNTY">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:pattern value="[0-9]{1}" />
    <xsd:pattern value="[0-9]{2}" />
    <xsd:pattern value="[0-9]{3}" />
    <xsd:pattern value="" />
    <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="PHONE_NUMBER">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:pattern value="[0-9]{10}" />
    <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="CLINIC_NAME">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:minLength value="0" />
    <xsd:pattern value="" />
    <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="CLINIC_TYPE">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:minLength value="0" />
    <xsd:pattern value="" />
    <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="CLINIC_NPI">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:pattern value="[0-9]{1}" />
    <xsd:pattern value="[0-9]{2}" />
    <xsd:pattern value="[0-9]{3}" />
    <xsd:pattern value="[0-9]{4}" />
    <xsd:pattern value="[0-9]{5}" />
    <xsd:pattern value="[0-9]{6}" />
    <xsd:pattern value="[0-9]{7}" />
    <xsd:pattern value="[0-9]{8}" />
    <xsd:pattern value="[0-9]{9}" />
    <xsd:pattern value="[0-9]{10}" />
    <xsd:pattern value="" />
    <xsd:whiteSpace value="collapse"/>
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="PROVIDER_OFFICE_HOURS_TENTHS">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:pattern value="[0-9]{1}" />
    <xsd:pattern value="[0-9]{2}" />
    <xsd:pattern value="" />
    <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="MAXIMUM_PATIENTS">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:pattern value="[0-9]{1}" />
    <xsd:pattern value="[0-9]{2}" />
    <xsd:pattern value="[0-9]{3}" />
    <xsd:pattern value="[0-9]{4}" />
    <xsd:pattern value="" />
    <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="ACCEPT_NEW_PATIENT">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:pattern value="[A-Z]{1}" />
    <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="PRIMARY_CARE_INDICATOR">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:pattern value="[A-Z]{1}" />
    <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="FACILITY_NUM">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:pattern value="[0-9]{1}" />
    <xsd:pattern value="[0-9]{2}" />
    <xsd:pattern value="[0-9]{3}" />
    <xsd:pattern value="[0-9]{4}" />
    <xsd:pattern value="[0-9]{5}" />
    <xsd:pattern value="[0-9]{6}" />
    <xsd:pattern value="[0-9]{7}" />
    <xsd:pattern value="[0-9]{8}" />
    <xsd:pattern value="[0-9]{9}" />
    <xsd:pattern value="[0-9]{10}" />
    <xsd:pattern value="" />
    <xsd:whiteSpace value="collapse" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    </xsd:schema>
    Here's a sample of the XML (significantly shortened, and names and IDs changed to protect the innocent). BTW, the XML validates cleanly against the schema definition:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <HMO DATE="03/26/2010">
    <HMO_GENERAL_INFORMATION>
    <MCO_ID_LIST>
    <MCO_ID>11111111</MCO_ID>
    </MCO_ID_LIST>
    <HMO_WEBSITE_ADDRESS>HTTP://WWW.SOMEHMONAME.COM</HMO_WEBSITE_ADDRESS>
    <HMO_SPECIAL_SERVICES>
    <CODE>00</CODE>
    </HMO_SPECIAL_SERVICES>
    <HMO_DAILY_CONTACT_EMAIL_ADDRESS>somename@someurl</HMO_DAILY_CONTACT_EMAIL_ADDRESS>
    <HMO_MONTHLY_CONTACT_EMAIL_ADDRESS>somename@someurl</HMO_MONTHLY_CONTACT_EMAIL_ADDRESS>
    </HMO_GENERAL_INFORMATION>
    <PROVIDERS RECORDS="1011">
    <PROVIDER>
    <NPI>1111111111</NPI>
    <FIRST_NAME>JOHN</FIRST_NAME>
    <LAST_NAME>DOE</LAST_NAME>
    <MIDDLE_INITIAL>A</MIDDLE_INITIAL>
    <GENDER>M</GENDER>
    <LINE_1_ADDRESS>1111 Some Rd</LINE_1_ADDRESS>
    <LINE_2_ADDRESS> </LINE_2_ADDRESS>
    <CITY>NOWHERE</CITY>
    <STATE>YN</STATE>
    <ZIP>12345</ZIP>
    <COUNTY>13</COUNTY>
    <PHONE_NUMBER>1111111111</PHONE_NUMBER>
    <CLINIC_NAME>SOME CLINIC - CORPORATE OFFICE</CLINIC_NAME>
    <CLINIC_NPI/>
    <ACCEPT_NEW_PATIENT>Y</ACCEPT_NEW_PATIENT>
    <PRIMARY_CARE_INDICATOR>N</PRIMARY_CARE_INDICATOR>
    <FOREIGN_LANGUAGES>
    <CODE> </CODE>
    </FOREIGN_LANGUAGES>
    <SPECIALTIES>
    <CODE>170</CODE>
    </SPECIALTIES>
    </PROVIDER>
    <PROVIDER>
    <NPI>2222222222</NPI>
    <FIRST_NAME>JANE</FIRST_NAME>
    <LAST_NAME>DOE</LAST_NAME>
    <MIDDLE_INITIAL>J</MIDDLE_INITIAL>
    <GENDER>F</GENDER>
    <LINE_1_ADDRESS>2222 SOMEOTHER ST</LINE_1_ADDRESS>
    <LINE_2_ADDRESS> </LINE_2_ADDRESS>
    <CITY>MYTOWN</CITY>
    <STATE>YN</STATE>
    <ZIP>12345</ZIP>
    <COUNTY>13</COUNTY>
    <PHONE_NUMBER>2222222222</PHONE_NUMBER>
    <CLINIC_NAME>SOME CLINIC - MYTOWN</CLINIC_NAME>
    <CLINIC_NPI/>
    <ACCEPT_NEW_PATIENT>Y</ACCEPT_NEW_PATIENT>
    <PRIMARY_CARE_INDICATOR>N</PRIMARY_CARE_INDICATOR>
    <FOREIGN_LANGUAGES>
    <CODE> </CODE>
    </FOREIGN_LANGUAGES>
    <SPECIALTIES>
    <CODE>322</CODE>
    <CODE>329</CODE>
    </SPECIALTIES>
    </PROVIDER>
    </PROVIDERS>
    <FACILITIES RECORDS="2">
    <FACILITY_NUM>1000000001</FACILITY_NUM>
    <FACILITY_NUM>2000000002</FACILITY_NUM>
    </FACILITIES>
    </HMO>
    As you can see, the SPECIALTIES node can contain more than one CODE value, si I can't use extractValue to retrieve them. Again, I need to extract the NPI value from the PROVIIDER node, and associate it with each of the CODE values from the SPECIALTIES node. So, what I would need to extract from this sample XML would be:
    NPI CODE
    1111111111 170
    2222222222 322
    2222222222 329
    This seems like it should be a pretty routine requirement, but I've tried everything I can think of (that is, everything I've learned to this point), and have not yet found a way............
    Ideally, the solution to extracting this data would utilize SQL (not PL/SQL, or Java, or XSL, etc) with XML extraction functions (e.g. extract, extractValue, XMLSequence, XMLTable, etc).
    Can anyone provide me with an example of how that iterative specialy code data could be extracted? Do I need to modify the .xsd to facilitate this extraction (so that registration of the schema results in other objects in the database)?
    Any suggestions or examples would be greatly appreciated.
    Thanks in advance, Dan
    P.S. - I hope the XML displays OK when I post this question!

    Hi,
    Thanks for your detailed sample, it's very helpful.
    This seems like it should be a pretty routine requirementIndeed, that's a classic (once you've got the method).
    So, here's how you can do it :
    SELECT x1.npi, x2.code
    FROM t,
         XMLTable(
          '/HMO/PROVIDERS/PROVIDER'
          passing t.doc
          columns
            npi number path 'NPI',
            specialties xmltype path 'SPECIALTIES'
         ) x1,
         XMLTable(
          'SPECIALTIES/CODE'
          passing x1.specialties
          columns
            code number path '.'
         ) x2
    ;Assuming the XML is stored in column T.DOC.
    As you see, for each NPI, the trick is to pass the entire SPECIALTIES node (kind of a join) to another nested XMLTable so that each CODE could be extracted as well.
    There's another method using only one XMLTable and a little more complex XQuery. I'll try to post it soon.
    HTH.
    Edit : 2nd method
    SELECT x.*
    FROM t,
         XMLTable(
          'for $i in /HMO/PROVIDERS/PROVIDER/SPECIALTIES/CODE
           return element e
            attribute npi { $i/../../NPI },
            $i/text()
          passing t.doc
          columns
            npi  number path '@npi',
            code number path '.'
         ) x
    ;Edited by: odie_63 on 27 mai 2010 18:43

  • Check for same parent and child combination

    hi all i am using oracle 10g. can you please help me in this issue.
    how do i know if the same combination of parent and child present in the table
    key value and value are the values given by user.
    if the user try to create a same profile with same set of key_value and value then that should be avoided
    so how to achieve that.
    example profile already in the table
    -- PROFILE_ID,DETAIL_ID,PARENT_DETAIL_ID,KEY_VALUE, VALUE, LAST_IND
    100,               1,               NULL,                      1,              CDE,     N
    100,               2,              1,                            2,              XXX,     N
    100,               3,              1,                            2,              YYY,    N
    100,               4,              1,                            4,              NEW,    Ynew profile by user -- it should throw an error saying that same profile already present
    -- PROFILE_ID,DETAIL_ID,PARENT_DETAIL_ID,KEY_VALUE,VALUE,LAST_IND
    101,               5,               NULL,                      1,              CDE,    N
    101,               6,              5,                            2,              XXX,    N
    101,               7,              5,                            2,              YYY,    N
    101,               8,              5,                            4,              NEW,    YEdited by: DeepakDevarapalli on Dec 9, 2009 9:48 AM
    Edited by: DeepakDevarapalli on Dec 9, 2009 9:59 AM

    sir i have used your logic, each query works fine and displays the correct results below are the results.
    SELECT   SUBSTR (t.ptxt, 2, LENGTH (ptxt)) profile_values
        FROM (SELECT     SYS_CONNECT_BY_PATH (rtxt, ',') AS ptxt
                    FROM (SELECT key_value || '/' || VALUE AS rtxt,
                                 ROW_NUMBER () OVER (PARTITION BY profile_id ORDER BY key_value,
                                  VALUE) AS rnum
                            FROM sp_profile_detail
                           WHERE profile_id IN (100, 101))
                   WHERE CONNECT_BY_ISLEAF = 1
              START WITH rnum = 1
              CONNECT BY rnum = PRIOR rnum + 1) t
    GROUP BY ptxtresults from query 1
    profile_values
    1/CDE,2/XXX,2/YYY,4/111
    1/CDE,2/XXX,2/YYY,4/222
    SELECT   SUBSTR (s.ptxt, 2, LENGTH (ptxt)) profile_values
        FROM (SELECT     SYS_CONNECT_BY_PATH (rtxt, ',') AS ptxt
                    FROM (SELECT key_value || '/' || VALUE AS rtxt,
                                 ROW_NUMBER () OVER (ORDER BY key_value,
                                  VALUE) AS rnum
                            FROM sp_profile_detail1)
                   WHERE CONNECT_BY_ISLEAF = 1
              START WITH rnum = 1
              CONNECT BY rnum = PRIOR rnum + 1) s
    GROUP BY ptxtresults from query 2
    profile_values
    1/CDE,2/XXX,2/YYY,4/111
    but when i tried to combine both and do a minus it throws me an error .
    ORA-00600: internal error code, arguments: [expcmo_strdef1], [27], [27], [], [], [], [], []
    -- target
    SELECT   SUBSTR (t.ptxt, 2, LENGTH (ptxt)) profile_values
        FROM (SELECT     SYS_CONNECT_BY_PATH (rtxt, ',') AS ptxt
                    FROM (SELECT key_value || '/' || VALUE AS rtxt,
                                 ROW_NUMBER () OVER (PARTITION BY profile_id ORDER BY key_value,
                                  VALUE) AS rnum
                            FROM sp_profile_detail
                           WHERE profile_id IN (100, 101))
                   WHERE CONNECT_BY_ISLEAF = 1
              START WITH rnum = 1
              CONNECT BY rnum = PRIOR rnum + 1) t
    GROUP BY ptxt
    MINUS
    -- staging
    SELECT   SUBSTR (s.ptxt, 2, LENGTH (ptxt)) profile_values
        FROM (SELECT     SYS_CONNECT_BY_PATH (rtxt, ',') AS ptxt
                    FROM (SELECT key_value || '/' || VALUE AS rtxt,
                                 ROW_NUMBER () OVER (ORDER BY key_value,
                                  VALUE) AS rnum
                            FROM sp_profile_detail1)
                   WHERE CONNECT_BY_ISLEAF = 1
              START WITH rnum = 1
              CONNECT BY rnum = PRIOR rnum + 1) s
    GROUP BY ptxt

  • How to list selected parent and child rows with values from ADF TreeTable

    I created one tree table having three levels using DepartmentsVO, EmployeesVO and
    JobHistoryVO where these tables contains parent and child relationship on database.
    Then i added one more column to the tree table which displays selectBooleanCheckBox. This
    check box is available for parent and child rows in that column.
    My first concern is i
    want to list out all the parentids and its child ids from three levels where the check
    box is selected.
    second concern is
    if i select the check box for a parent row, then the remaining check boxes for child rows also select automatically which are comes under the parent row.
    Thanks in advance.
    jk

    hi Frank,
    Thanks for the quick reply...
    As I mentioned before I am able to get the children using JUCtrlHierNodeBinding. but wanted to change the value of child row which have specific data.
    Is it possible through JUCtrlHierNodeBinding to update data of child and parent?? If so then can you please post the code snippet for the same???
    Viral

  • Delivery document how to print the BOM Parent and Child items

    Hi,
    I have a production BOM. In Delivery document how to print the Parent and Child items Item Code and Qty.At the time
    of add a delivery document Inventory stock redused only in Parent Item not child item because child item stock already reduced in issue for production.

    If you need to print both the BOM Parent and Child items, you have to create your own report. BOM is only for production if it is not Sales type.
    Thanks,
    Gordon

  • Session expiration issue with parent and child window

    Hi,
    We have two applications (App1 - Implemented using JSF, Spring and Hibernate and App2 -Implemented using Spring MVC, Spring JDBC).
    I have implemented 'Test Access Content' functionality in App1.
    First admin user (Role- Manager) needs to login to App1
    As part of 'Test Access Content' functionality, he enters URL with encrypted key and click 'Test Access' button.
    It opens new window (implemented using java script - window.open) and hits spring controller of App2.
    In spring controller of App2, I am decrypting the key to get user details. After that i am setting user details in session, constructing final URL to display actual content.
    Problem is parent window maintains session till child window renders response. Once child window renders response, parent window loosing session.
    So, if i click any button in parent window after child window renders response, it displays login page as there is no session for parent window.
    Please note that App1 and App2 are sharing same domain. only context paths are different for both apps (app1 and app2).
    Any suggestions on this issue are much appreciated. Please let us know if you have any questions.

    Hi,
    When you open a child window from parent window then you can access child data in the parent window through javascript.
    We have a main web page. There are quite many links on it from which >user can open new web pages but the data is saved when the submit >button on the main page is clicked. Also data that user entered on the >other sub pages is not displayed in the main window.
    1 is this a case of parent and child window.case 1 When you are submitting the main page you need to run javascript function and get data from child windows and save that to database or session. next time when you are displaying the main window you need to query session or database to display the child window data in the main window.
    Case 2> closing child window and you need data in the parent. This can be done in two ways.
    1> When you are closing the child window populate some variables of the main window using javasript.
    2> Save the values in the database or session and refresh the main window and extract data from database or session
    Where should the data be saved that user enetered on the sub pages as the data is not shown in the main page - should it be stored in the session?It is design decision. You can store data in either session or database when you are closing the child window. But ifyou are saving the data on the main page then you can populate main page with child windows data using javascript. Save the data t database when main window data is saved. Depends on business requirements.
    In short if you are saving child windows data in session or database then you need to refresh main screen to pull that data otherwise populate main screen using javascript.
    I hope i answered your questions :) best of luck

  • Insert data Flatfile table to Parent and child tables

    Hi All,
        I have Flatfile table which is we getting from daily txt files and i want to populate flatfile data to parent as well as child tables. parent table has primary key as ID. This ID is foreign key of child tables. 
    Here i have mentioned our process.
    1. Flatfile duplicates has to remove with condition of daily date.
    2. Before Insert parent table have to check duplicate(we have Unique key of 4 columns in parent) if duplicate is there we have to delete duplicate then Insert into parent table unique records(Primary key is ID).(here why we are delete duplicate record meaning
    we getting daily files so if any records updated in future that record should be insert to parent and child table so only we delete old records and insert new records).
    3.After insert parent we have to populate child tables from Flatfile table as well as we have to insert parent table primary key as foreign key of child tables.
    4. if any truncation error occurs that errors should go to error log table.
    Right now we are using cursor for this concept and cursor has performance issue. so we are trying to optimize other way to populate parent and child table to increase performance to populate.
    Please help us to which way to do this process increase of performance .
    Please  can any one reply.

    Hi RajVasu,
    Since this issue is related to Transact-SQL, I will move this thread to Transact-SQL forum. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated. 
    Thank you for your understanding and support.
    Regards,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Merge of parent and child content of a heirarchy

    Can anyone say the procedure to of merging the parent and child link of heirarchy into one string and been displayed in a seperate feild

    Lakshmi Kanth,
    I am <b>assuming</b> that you are refering to "Merge Records" option in MDM Data Manager. If this is the scenario that you are looking for then here are the details:
    When it comes to Hierarchy tables, merging records is different than Merging Main table records. This option in Hierarchy tables also has lot of constraints - One of them is "Destination and source node cannot have children". Because of this, currently it is not possible to merge Parent- child records. However, for more information, please refer to this <a href="http://help.sap.com/saphelp_mdmgds55/helpdata/EN/43/9967ab46ec60b7e10000000a11466f/content.htm">link</a> for more information on Merging in Hierarchy tables.
    If "Merge Records" in Data Manager is not the option that you are looking for, let us know more details.
    Regards,
    Rajani Kumar

  • How to differentiate between Parent and Child in IBASE?

    Hi. I am working on enhancing a BAPI :BAPI_GOODSMVT_CREATE by calling the following function module IBPP_CREATE_IBASE at its exit.
    The BAPI is being called from an SAP ME system and will be passing MATNR and Serial Number of Parent and Child materials to create the IBASE in ECC system. I am confused as to how to differentiate between whether a object is Parent or a Child when the BAPI: BAPI_GOODSMVT_CREATE is called.

    if you have NULL valued fields. If
    you do a compare and one or both are NULL, then the result is always NULL,
    never true or false. Even comparing two fields which are both NULL will
    give NULL as result, not true! Or if you have something like "select
    sum(field) from ..." and one or more are NULL, then the result will be
    NULL. Use always "if field is NULL ..." for NULL checking and for safety
    maybe something like "select sum( IsNull(field,0) ) from ...". Check the
    function ISNULL() in the manual.

  • How to update parent and child tables while updating parent table

    I have a parent table EMPLOYEE which includes columns (sysid, serviceno,employeename...) sysid is Primary key, serviceno is Unique key and I have child table DEPENDENT includes columns (sysid,employee_sysid,name,dob...) here again SYSID is primary key for DEPENDENTS table, employee_sysid is Foreign key of EMPLOYEE table.
    Now I want to change SYSID (using sequence) in EMPLOYEE table which need to be update in DEPENDENTS table as well
    Note: I have 10000 records in EMPLOYEE table as well as I have 5 more child tables which need to update new SYSID.
    please help me

    first disable the FOREIGN KEY Constraints.
    you can update Parent as well as Child record also with help of trigger.
    here i am giving you one examlpe..it may help u.
    create table parent(id number primary key,name varchar2(100))
    create table child_1(id number primary key,p_id number,dob date,
    CONSTRAINT FK_id FOREIGN KEY (p_id) REFERENCES parent (ID))
    create table child_2(id number primary key,p_id2 number,addr varchar2(1000),
    CONSTRAINT FK_id2 FOREIGN KEY (p_id2) REFERENCES parent (ID))
    insert some test data to parent and child tables.
    alter table child_2 disable constraint FK_id2
    alter table child_1 disable constraint FK_id2
    CREATE OR REPLACE TRIGGER delete_child
    BEFORE UPDATE ON parent
    FOR EACH ROW
    BEGIN
    UPDATE CHILD_1
    SET P_ID=:NEW.ID
    WHERE P_ID=:OLD.ID;
    UPDATE CHILD_2
    SET P_ID2 =:NEW.ID
    WHERE P_ID2=:OLD.ID;
    END;
    then Upadte parent table primary key col and check the child tables.
    then enable the constraints...

Maybe you are looking for

  • BP replication from CRM 7.0 to ECC 6.0

    Hi Gurus, when ever we create new BP in CRM , it is not replicating to ECC A bdoc type "bupa_main" is generated in txn:Smw01 which reads "partially send, receivers" error type 02, state not processed , it gives error "fill in all required entry" thou

  • MYOB AccountEdge - Sharing data file with remote Windows PC

    I use MYOB AccountEdge in a Mac environment at my office. Bookkeeper uses MYOB AccountEdge in a PC environment. We both would like to be able to have access to my MYOB data file. Simultaneous access to the file is not a requirement. We're not in the

  • Iphoto and Magic Mouse

    Hi, I have a big problem. I have iphoto 11 and a magica mouse. After I installed Lion, when I try to scroll up and down with the magic mouse, iphoto always get stuck. The funny thing is if I use my normal wireless mouse I have no problem at all. How

  • Has anyone ever had a problem with your iphone working outside your home but not inside. The internet works fine in and outside of the house

    Has anyone had problems with your iphone working outside of the house, but not inside? Cannot make or receive calls, nor can I send or receive any text messages. This is something that just happened out of nowhere. Can I get some help please?

  • Help with Switch-Case Statement

    How do you get this in a switch-case statement or work with it?           if (age < 70) {                     JOptionPane.showMessageDialog(null, "People that are below the 70s are nothing special.");           else if (age > 69 && age < 80) {