Problem in delting child node from tree

Hello friends I have a problem in tree component
I am using Xml File with creator .
I am showing company name as a root node
then department name as a child of company name
then employee name as a child of department
Initialy its working fine ,user can add edit and delete any node
In add and edit option I have no problem but in delete I hava a problem
when I am deleting any child node and after deleting the node I am clicking on the root node of the deleted node the it gives me null pointer Ecxeption .
but user added any child node and then delete it then Application work properly .
What is the problem I can't Understand please help me
thanks
Raviraj Gangrade

thanks deepsix for helping me
it gives me java.lang.NullPointerException and class name is
net.sf.saxon.dom.NodeWrapper$ChildEnumeration
here is my Stack Trace
javax.faces.FacesException: #{Graphs.childNode_action}: javax.faces.el.EvaluationException: java.lang.NullPointerException
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:78)
at com.sun.rave.web.ui.appbase.faces.ActionListenerImpl.processAction(ActionListenerImpl.java:57)
at javax.faces.component.UICommand.broadcast(UICommand.java:312)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:307)
at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:79)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:221)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
at sun.reflect.GeneratedMethodAccessor270.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:194)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:189)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doProcess(ProcessorTask.java:604)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:475)
at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:371)
at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:264)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:281)
at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:83)
Caused by: javax.faces.el.EvaluationException: java.lang.NullPointerException
at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:130)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
... 44 more
Caused by: java.lang.NullPointerException
at pegasusweb.Graphs.childNode_action(Graphs.java:1075)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
... 45 more
|#]
[#|2006-11-30T14:51:30.000+0530|SEVERE|sun-appserver-pe8.2|javax.enterprise.system.container.web|_ThreadID=16;|StandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
com.sun.rave.web.ui.appbase.ApplicationException: #{Graphs.childNode_action}: javax.faces.el.EvaluationException: java.lang.NullPointerException
at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.destroy(ViewHandlerImpl.java:601)
at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:302)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:221)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
at sun.reflect.GeneratedMethodAccessor270.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:194)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:189)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doProcess(ProcessorTask.java:604)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:475)
at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:371)
at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:264)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:281)
at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:83)
Caused by: javax.faces.FacesException: #{Graphs.childNode_action}: javax.faces.el.EvaluationException: java.lang.NullPointerException
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:78)
at com.sun.rave.web.ui.appbase.faces.ActionListenerImpl.processAction(ActionListenerImpl.java:57)
at javax.faces.component.UICommand.broadcast(UICommand.java:312)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:307)
at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:79)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:221)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
... 36 more
Caused by: javax.faces.el.EvaluationException: java.lang.NullPointerException
at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:130)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
... 44 more
Caused by: java.lang.NullPointerException
at pegasusweb.Graphs.childNode_action(Graphs.java:1075)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
... 45 more
|#]

Similar Messages

  • How to add child node in Tree table programmetically

    Jdev Version 11.1.1.4.0.
    I have created tree table programmetically in bean.
    I have to add child node to tree table component on button click event on page.
    Please let me know how to do this in bean.
    Regards,
    Kiran

    How are you creating the tree pro-grammatically?
    If you are adding a new node to underlying data structure and refresh the tree - the tree will get updated with the new data.
    Thanks,
    Navaneeth

  • Problem when selecting child node in Hierarchical Tree

    I have a hierarchical tree on a form populated thru a table query(form1). When I click on a child node, it opens form2 which contains a tab canvas. After closing forms, I return to the form1(containing Tree). At this point If I want to click on the same child node, I should be able to open form2 again. This doesn't happen.
    I have the following code in my When-Tree-node_selected trigger:
    Declare
    htree item;
    vnode_label varchar2(50);
    node_clicked FTREE.NODE;
    vnode_value number;
    vnode_depth number;
    v_type number;
    v_value varchar2(100);
    v_form_name varchar2(100);
    v_alert_return number;
    begin
    -- Find the tree itself.
    htree := FIND_ITEM('tree_block.tree');
    node_clicked := :SYSTEM.TRIGGER_NODE;
    vnode_value := FTREE.NODE_label;
    -- Find the value of the node clicked on.
    vnode_label := FTREE.GET_TREE_NODE_PROPERTY (htree,:SYSTEM.TRIGGER_NODE,FTREE.NODE_label);
    vnode_depth := to_number(ftree.get_tree_node_property(htree,:SYSTEM.TRIGGER_NODE,ftree.Node_depth));
    --Open form for node selected on tree and/or specific tab page
    if vnode_depth <> 1 then
    if :system.trigger_node_selected = 'TRUE' then CASE vnode_label
    WHEN 'Personal' then
    v_form_name :='HR_PERSONAL_INFO_UPDATE';
    WHEN 'Citizenship' then
    v_form_name :='HR_PERSONAL_INFO_UPDATE';
    WHEN 'Emergency Contact' then
    v_form_name :='HR_PERSONAL_INFO_UPDATE';
    if id_null(Find_form(v_form_name)) then
    open_form(:global.application_path || v_form_name,ACTIVATE,NO_SESSION,SHARE_LIBRARY_DATA);
    else
    go_form(v_form_name);
    end if;
    END IF;
    elsif vnode_depth = 1 then
    if :system.trigger_node_SELECTED = 'TRUE' then CASE vnode_label
    WHEN 'EMPLOYEE INFO' then
    v_form_name :='HR_PERSONAL_INFO_UPDATE';
    vnode_label := 'Personal';
    WHEN 'REPORTS' then
    v_form_name :='HR_REPORTS';
    vnode_label := '';
    if id_null(Find_form(v_form_name)) then
    v_form_name := :global.application_path || v_form_name;
    open_form(v_form_name,ACTIVATE,NO_SESSION,SHARE_LIBRARY_DATA);--,p_list);
    else
    go_form(v_form_name);
    end if;
    end if;
    end;
    Can anyone please help me? I don't want the user to double click. They should only click once.
    Thanks,
    Mercedes

    Right clicking does not change the current selection. The tree has no way to report what node was right clicked. Only work around is to left click the node you wish then right click it.
    --pat                                                                                                                                                                                                                                                                                                                                                                                                       

  • Insert Parent Node From Tree To Another

    Hello
    My problem is: haw can I insert or shift Parent Node with its child from tree to another without use SQL query.
    I should find the child and if this child has a child to shift with the parent to another tree, there are no tools or function can return the child of the node? Or what is the best procedure to do that?
    I will be thankful if there some one can help me
    Regards

    You can grab the data with ftree.populate_group_from_tree and then use ftree.add_tree_data to put it in another tree.

  • How can I remove child node from JTree???

    Hi,
    I would like to remove all the child node of my jtree. For instance I would like to remove the c, d, and e nodes. It's possible to remove all the child node or to remove by her name ("c", "d", and "e"). If yes what is the method that it permit to do.
    A-----
    |
    b-------c
    |
    |--------d
    |
    ---------e
    I use the model : DefaultMutableTreeNode
    Thanks

    There are a couple of ways it can be done. If your tree uses DefaultTreeModel as its TreeModel, you can use removeNodeFromParent(). This will remove the node from its parent and effectively remove its children, too. All nodes removed will be garbage-collected if there are no other references to them.
    If your tree model is not the default tree model, but still uses MutableTreeNode, you can use either remove() or removeFromParent() on the node itself, depending on whether you want to remove the node itself or one of its children.
    On the other hand, your tree may use a model that simply "mirrors" another data structure, in which case you would have to remove the node from the other data structure and have it reflected in the model.

  • How to open child node in Tree control?

    Hi All,
    I am using arrayCollection in my tree control.
    I want to open one child node based on name of that node.
    How to open that chid node?
    I tried tree.OpenItems and ExpandItem methods. IT is not working. Any idea how to do it?

    write this statement
    TreeObject.expandItem("the branch",true)
    But make sure you dont call this statement right after you set the dataProvider for the tree object. Instead wait for a second or two and then call this statement. This delay is allow the tree object ot call it validate functions.
    Let me know if it helps

  • I am having a problem finding a child node (c#)

    Hi !
    My XML is a bit like this:
    <Layers>
    <Layer>
    <OverlapNames>
    </OverlapNames>
    <CommonNames>
    </CommonNames>
    <SnapNames>
    <SnapName Name="zzz" />
    <SnapName Name="yyy" />
    </SnapNames
    </Layer>
    </Layers>
    I have this initial XmlNode which returns a valid object:
    XmlNode nodeLayer = xmlDoc.SelectSingleNode(String.Format("Layers/Layer[@Name=\"{0}\"]", strLayer));
    Now what I want to do is try to find within this node if there is a SnapNames/SnapName with a value of, eg: zzz.
    So I thought this would work (where strLayer2 is "zzz":
    XmlNode nodeLayer2 = nodeLayer.SelectSingleNode(String.Format(".//SnapsNames/SnapName[@Name=\"{0}\"]", strLayer2));
    // Also tried:
    XmlNode nodeLayer2 = nodeLayer.SelectSingleNode(String.Format("SnapsNames/SnapName[@Name=\"{0}\"]", strLayer2));
    But nodeLayer2 is always null! The only way I have managed to do it so far is like this:
    bool bIsSnapName = false;
    if (nodeLayer.HasChildNodes)
    for (int i=0; i<nodeLayer.ChildNodes.Count; i++)
    if (nodeLayer.ChildNodes[i].Name == "SnapNames")
    XmlNode nodeSnapNames = nodeLayer.ChildNodes[i];
    XmlNode nodeSnapName = nodeSnapNames.SelectSingleNode(String.Format("SnapName[@Name=\"{0}\"]", strLayer2));
    if (nodeSnapName != null)
    bIsSnapName = true;
    break;
    What am I doing wrong? How can I take the nodeLayer object and return the sub node from SnapNames/SnapName where Name = "zzz"?
    Thanks.

    Thanks. I could use that because SnapName only appears inside the SnapNames node. But I was trying to be more specific. For example, this improved code works fine:
    XmlNode nodeSnapNames = nodeLayer.SelectSingleNode("SnapNames");
    XmlNode nodeSnapName = null;
    if(nodeSnapNames != null)
    nodeSnapName = nodeSnapNames.SelectSingleNode(String.Format("SnapName[@Name=\"{0}\"]", strLayer2));
    I just tried what you said and it does work. But how do we specifically search the "SnapNames" child as opposed to any of the children? Understand?

  • Remove root node from tree ...

    hi all,
    how can i delete the root node from a tree ???
    i've tried:
    tree.removeAll();
    this removes all nodes from the tree except the root.
    thanks.

    try this:
    tree.setRootVisible(false);
    Bye!

  • Update xml column by inserting any missing child nodes from a M_V

    Hello all,
    I am trying to update a xml column(col1) of a table (abc) by looping through, by selecting from a materialized view and find any missing (child) nodes in the existing table (abc) of a xml column (col1) on each rows, and then do update the xml column (col1) of table (abc). How to do this in Oracle pl/sql?.
    Thanks & Regards,
    Josh

    You do not need stored procedure for that. Use something like APPENDCHILDXML, INSERTCHILDXML or INSERTXMLBEFORE. For example, to insert a node into XML document:
    SELECT  APPENDCHILDXML(
                           XMLTYPE(
                                   CURSOR(
                                          SELECT  ENAME,
                                                  SAL
                                            FROM  EMP
                                            WHERE DEPTNO = 10
                          '//ROW',
                          XMLTYPE('<ROW><ENAME>user631757</ENAME><SAL>10000</SAL></ROW>')
                         ) EMP_XML
      FROM  DUAL
    EMP_XML
    <?xml version="1.0"?><ROWSET><ROW><ENAME>CLARK</ENAME><SAL>2450</SAL><ROW><ENAME
    user631757</ENAME><SAL>10000</SAL></ROW></ROW><ROW><ENAME>KING</ENAME><SAL>5000</SAL><ROW><ENAME>user631757</ENAME><SAL>10000</SAL></ROW></ROW><ROW><ENAME>MILL
    ER</ENAME><SAL>1300</SAL><ROW><ENAME>user631757</ENAME><SAL>10000</SAL></ROW></R
    OW></ROWSET>
    SELECT  INSERTXMLBEFORE(
                            XMLTYPE(
                                    CURSOR(
                                           SELECT  ENAME,
                                                   SAL
                                             FROM  EMP
                                             WHERE DEPTNO = 10
                           '//ROW[ENAME="KING"]',
                           XMLTYPE('<ROW><ENAME>user631757</ENAME><SAL>10000</SAL></ROW>')
                          ) EMP_XML
      FROM  DUAL
    EMP_XML
    <?xml version="1.0"?><ROWSET><ROW><ENAME>CLARK</ENAME><SAL>2450</SAL></ROW><ROW>
    <ENAME>user631757</ENAME><SAL>10000</SAL></ROW><ROW><ENAME>KING</ENAME><SAL>5000
    </SAL></ROW><ROW><ENAME>MILLER</ENAME><SAL>1300</SAL></ROW></ROWSET>
    SQL> SY.

  • Read Xml Child node from XML Blob

    Hi Gurus,
    Greetings
    I am working in oracle 10g /Solaris platform.
    I have table with columns namely id varcha2,pmt blob.
    PMT stores xml file.
    <Products xmlns:source="http://apache.org/cocoon/source/1.0" DocStatus="approved" DocTimeStamp="2013-04-18T06:52:14" DocType="PMT" DocVersion="xUCDM_product_external_1_3.xsd">
    <Product Country="DE" IsAccessory="false" IsLocalized="true" IsMaster="false" Locale="de_DE" lastModified="2013-04-18T00:08:11" masterLastModified="2013-02-25T14:46:40">
    <Assets>
      <Asset code="46PFL8008S_12" description="User manual" extension="pdf" extent="3359201" lastModified="2013-04-18" locale="de_DE" number="001" type="DFU">http://download.p4c.abc.com/files/4/46pfl8008s_12/46pfl8008s_12_dfu_deu.pdf</Asset>
      <Asset code="46PFL8008S_12" description="Leaflet" extension="pdf" extent="970750" lastModified="2013-04-18" locale="de_DE" number="001" type="PSS">http://download.p4c.abc.com/files/4/46pfl8008s_12/46pfl8008s_12_pss_deu.pdf</Asset>
      <Asset code="46PFL8008S_12" description="Quick start guide" extension="pdf" extent="911832" lastModified="2013-04-18" locale="de_DE" number="001" type="QSG">http://download.p4c.abc.com/files/4/46pfl8008s_12/46pfl8008s_12_qsg_deu.zip</Asset>
      <Asset code="46PFL8008S_12" description="Front product photograph - highres 2196x1795" extension="jpg" extent="1989253" lastModified="2013-04-18" locale="global" number="001" type="_FP">http://images.abc.com/is/image/abcConsumer/46PFL8008S_12-_FP-global-001</Asset>
      <Asset code="46PFL8008S_12" description="Alternative product photograph 1 - highres 2196x1795" extension="jpg" extent="603474" lastModified="2013-04-18" locale="global" number="001" type="A1P">http://images.abc.com/is/image/abcConsumer/46PFL8008S_12-A1P-global-001</Asset>
      <Asset code="46PFL8008S_12" description="Alternative product photograph 2 - highres 2196x1795" extension="jpg" extent="407701" lastModified="2013-04-18" locale="global" number="001" type="A2P">http://images.abc.com/is/image/abcConsumer/46PFL8008S_12-A2P-global-001</Asset>
      <Asset code="46PFL8008S_12" description="Alternative product photograph 3 - highres 2196x1795" extension="jpg" extent="174261" lastModified="2013-04-18" locale="global" number="001" type="A3P">http://images.abc.com/is/image/abcConsumer/46PFL8008S_12-A3P-global-001</Asset>
      <Asset code="46PFL8008S_12" description="Alternative product photograph 4 - highres 2196x1795" extension="jpg" extent="109712" lastModified="2013-04-18" locale="global" number="001" type="A4P">http://images.abc.com/is/image/abcConsumer/46PFL8008S_12-A4P-global-001</Asset>
       </Assets>
    </Product>
      </Products>');
      I want the extract the ids from the table where pmt contains the child node (asset) contains .zip
    for example http://download.p4c.abc.com/files/4/46pfl8008s_12/46pfl8008s_12_qsg_deu.zip
    Then, I tried like this...
      select r.* from
       (SELECT xmltype(pmt) object_value
                     FROM PRODUCT_TR_PMT
                     XMLTABLE
                                     'for $Product  in $TEST/Products/Product/Assets/Asset
                                         return <RESULT>
                                                   $Product                     
                                                </RESULT>'
                                     passing OBJECT_VALUE as "TEST"   
                                     columns Asset path 'Asset' 
                                 ) r;
    ORA-02263: need to specify the datatype for this column
      Could you kindly help.
    Thanks
    Raj

    Blob storage we (db folks) dont have any control its from application standard design.
    If necessary, i can create function blob to clob.
    Kindly help me in extracting child node which contains zip.
       select r.* from
       (SELECT xmltype(pmt) object_value
                     FROM PRODUCT_TR_PMT
                     XMLTABLE
                                     'for $Product  in $TEST/Products/Product/Assets/Asset
                                         return <RESULT>
                                                   $Product                     
                                                </RESULT>'
                                     passing OBJECT_VALUE as "TEST"   
                                     columns Asset varchar2(255) path 'Asset' 
                                 ) r;
    ORA-06553: PLS-306: wrong number or types of arguments in call to 'XMLTYPE'Thanks
    Raj

  • Get child nodes and only child nodes from a tree?

    Hi all,
    Relatively simple table
    create table replaced_parts
    old_part_number varchar(7),
    replaced_part_number varchar(7),
    updated_date date
    insert into Replaced_parts values('AAAAA/1', 'BBBBB/1', '2012-Feb-16');
    insert into Replaced_parts values('BBBBB/1', 'FFFFF/1', '2012-Feb-23');
    insert into Replaced_parts values('YYYYY/3', 'ZZZZZ/3', '2012-Mar-17');
    insert into Replaced_parts values('FFFFF/1', 'LLLLL/1', '2012-Mar-18');
    insert into Replaced_parts values('LLLLL/1', 'HHHHH/1', '2012-Mar-19');The question is how do I issue a select using 'AAAAA/1' and get the result 'HHHHH/1'
    i.e. (A... -> B, B->F, F->L, L->H)
    and select using 'YYYYY/3' to get 'ZZZZZ/3' (Y... ->Z)?
    It would be really nice if I could also get my original value, say, 'CCCCC/1' if there is no entry
    for 'CCCCC/1' in the replaced_parts table (maybe NVL?).
    I have googled and tried various combinations of CONNECT BY, PRIOR, ISLEAF... &c. but
    am beating my head off a brick wall at the moment.
    TIA,
    Paul...

    >
    Hi, Paul,Hi again Frank - couldn't sleep and am back at the "£$%^&* computer...
    Yeah - it's a pity they weren't correct - I'll make doubly sure in future - see
    my edited post (with DROP TABLE commands inter alia - I also removed
    Order_Parts.User_Number since it was redundant - all that's needed is
    Order_Number (normalisation) so now your SQL doesn't work - sorry
    about that.
    Just saying something "doesn't work" isn;t very helpful. What exactly is wrong with the SQL
    statements I posted? Point out a couple of places where they are wrong, and explain how
    you get the right results in those places.Nothing is wrong with your SQL - I meant *sorry* about the confusion in the DDL/DML from my end.
    Now, I'm sorry again about the ambiguity of my English.
    I'll reconstruct the original data that I gave you and re-run your SQL against that data - again,
    this is *totally* my fault.
    My tables creation script seems to work fine now - I've edited my reponse to Solomon - the definitive scripts
    are now there - with Order_Parts.User_Number gone and the TO_DATE(...) as
    you suggested - the VARCHARs seemed to give the right result though - but I
    agree that if there's a correct way of doing it, then it should be done that way.
    Remember why you need to go to the trouble of posting CREATE TABLE and INSERT statements
    for some sample data here. It's to allow the people who want to help you to re-create the prolem
    and test their ideas. I know, and that's why I did it - the OR REPLACE that I added (stupidly and without thinking or testing) was
    so that people wouldn't have to go to the trouble of dropping the tables - I have now added
    DROP TABLE blah... to the beginning of the script so it won't be necessary.
    I have over 600 posts on this forum and only 26 questions - most of my time
    spent here is trying to help (to the best of my limited ability - I'm not a guru
    like yourself) and learning - it's amazing the number of times problems that
    I've seen here have subsequently arisen at work - and I am frequently
    frustrated by some posters' inability to explain their problem or at least give test
    cases.
    I can forgive bad English (except my own) - not everybody is a fluent speaker of the language,
    but SQL should run no matter what language one speaks.
    I appreciate that people are volunteering their time and effort here and I really do
    try and make it as easy as possible for them when I ask questions - I messed up
    this time, I'm afraid. It might also be the fact that I'm moving between SQL*Plus
    and SQL Developer and a text editor that I got confused (plus, fatigue didn't help...)
    In general, other people are not going to test anything on your system. I'm going to test
    things on my system, Solomon will test things on his system, and other people will test things
    on other systems. Well, if ever you're in Dublin ;). Again, I appreciate the effort that you, Solomon and sKr have
    gone to in helping me.
    Your INSERT earlier statements did not work on my system, because you were using a VARCHAR2
    in a place where a DATE was required. The correct thing to do is to use DATEs where DATEs are required. Indeed, and I agreed with you that if there's a right way of doing it, then it should be done that way.
    If your NLS settings are such that this is not causing you any errors right now, it's still a good
    idea for you to fix it; but, at any rate, whether it works on your system isn't what's important in
    this case; you're posting it to run on other peoples' systems.Ahhh.... <the blinding light of a moment of epiphany descends on Paul> I didn't realise it was
    an NLS setting - of course Americans will be different - it's just that I thought that YYYY-Mon-DD
    worked everywhere (I tried to avoid the day-first/month-first pitfall ) but now that you've explained
    it to me, I'll *never* make that mistake again.
    Yes - my mistake - I've now corrected the error
    Where are the desired results? Don't merely hide them in an old message; post them in a new message.OK. I'll put it in a reply to this post. I really am endeavouring to be as clear as possible - please
    excuse my errors - I will do better in future. I'm also very annoyed at my own incompetence and at
    having put you to more trouble than you would have had to go to if I had my wits about me.
    - should I keep Order_Parts.User_Number even
    if it isn't conformant to normalisation rules?
    If you have a good reason, it's okay to store de-normalized data. For example, some address tables in
    the US contain both state and ZIP code, even though state is fucntionally depenedent on ZIP code. I think that in this case, denormalisation is not called for.
    Re. the ZIP code thing, yeah, sure AIUI, the first two digits are dependent on the state, but the
    last three? They're more or less random - at least in the sense that there's no way to type
    in an address and calculate (mathematically, using a formula) them - so unless one were
    to have weird SQL lookups to a "State" table for the first two digits and then take the final
    three from a user-entered string field, then do a TO_CHAR on the returned 2-digit state number and add
    this to the 3-character one - I can't see how the ZIP code is an example of this? But, maybe
    (unless you wish to discuss that) we're getting side-tracked. Perhaps I'll ask this question
    on comp.databases.theory?
    Oracle actually added a new feature in version 11 (virtual columns) to make de-normalizing easier.Hmmm... is adding virtual columns denormalisation per se? My favourite "cheap'n'cheerful"
    db server (Firebird) has had a COMPUTED BY clause (same idea) for yonks (> 12yrs) - no data
    is actually stored - rather it is calculated on the fly. Another one for comp.databases.theory
    perhaps?
    BTW, wouldn't triggers remove all this hassle? It was my first idea, but trying to do it
    purely through SQL is now *obsessing* me ;)
    That would be another example of de-normalization. If the benefits of doing that outweigh the
    costs, then go ahead. A trigger will take some effort to maintain, and it will make all DML slower, regardless
    of how often that derived value is needed. Having the extra column will make some queries simpler and faster. Disk is cheap. Have an Original_Orders table (never changes) and a Revised_Orders table. When
    a part replacement occurs - for orders that haven't been fulfilled (boolean flag?), change the
    old part number to the new one. I can't imagine that replacement occurs very frequently, so
    the expense of a trigger would IMHO be minimal - plus the down side of any trigger would
    be mitigated by greatly simplifying the production of the Revised_Orders report?
    ... I'll experiment with what you've given me so far - but it's 23:40 here now, so I won't
    get a chance to do it tonight - unfortunately, I *do* have to sleep.
    If you haven't tested it yet, why did you start this message saying "your SQL doesn't work"?Sorry - what I meant was it obviously doesn't work when this eejit (i.e. me) has changed
    the table structure - I did run it quickly (your 1st statement) against the (revised table
    structure, the one you hadn't seen and I don't think even a man of your great SQL talents
    can be expected to write working queries against unknown table structures :)).
    Again, thanks for your help so far - I'll post the *_correct_* DDL and DML as a reply to this post
    with the desired result. I'll also reconstitute the old (i.e. the one you worked against) tables
    and data and let you know - again as a reply to this post - if I can at least learn something
    from my fiasco, it won't have been a total waste of my time, and again, apologies for
    wasting yours.
    Thanks again and rgs.
    Paul...
    Edited by: Paulie on 22-Mar-2012 02:50

  • Can't get child node in tree selection listener

    I am making a fusion web application using JDeveloper 11G (11.1.1.2.0).
    I have created two view objects linked together. Let's call them VoDepartments and VoEmployees, linked on DepartmentId.
    I hava made a tree with a af:switcher
    <af:switcher id="s1" facetName="#{node.hierType.structureDefName}">
    <f:facet name="view.VoDepartments">
      <af:outputText value="#{node}" id="ot1"/>
    </f:facet>
    <f:facet name="view.VoEmployees">
      <af:outputText value="#{node}" id="ot2"/>
    </f:facet>
    </af:switcher>I made a selection listener based on a guide by Frank Nimphius
    RichTree tree1 = (RichTree) selectionEvent.getSource();
    RowKeySet rks2 = selectionEvent.getAddedSet();
    Iterator rksIterator = rks2.iterator();
    if (rksIterator.hasNext()){
      List key = (List)rksIterator.next();
      JUCtrlHierBinding treeBinding = null;
      treeBinding = (JUCtrlHierBinding) ((CollectionModel)tree1.getValue()).getWrappedData();
      JUCtrlHierNodeBinding nodeBinding = nodeBinding = treeBinding.findNodeByKeyPath(key);
      String nodeStuctureDefname = nodeBinding.getHierTypeBinding().getStructureDefName(); //Here is the nullpointerexception for employees
      String employees = "view.VoEmployees";
      String departments = "view.VoDepartments";
      if (nodeStuctureDefname.equalsIgnoreCase(departments)){
       String dept = (String) nodeBinding.getAttribute("Department_name");  
       System.out.println("Department = "+dept);
      else if (nodeStuctureDefname.equalsIgnoreCase(employees)){
       String emp = (String) nodeBinding.getAttribute("First_name");  
       System.out.println("Employee = "+emp);
      else{
       //what the heck did the user click on? Ask him ;-)
    }Pagedef:
    Executables:
    <iterator Binds="VoDepartments2" RangeSize="25" DataControl="AppMainDataControl" id="VoDepartments2Iterator"/>
    Bindings:
    <tree IterBinding="VoDepartments2Iterator" id="VoDepartments2">
    <nodeDefinition DefName="view.VoDepartments" Name="VoDepartments20">
      <AttrNames>
       <Item Value="DepartmentId"/>
      </AttrNames>
      <Accessors>
       <Item Value="VoEmployees"/>
      </Accessors>
    </nodeDefinition>
    <nodeDefinition DefName="view.VoEmployees2" Name="VoDepartments21">
      <AttrNames>
       <Item Value="First_name"/>
       <Item Value="Last_name"/>
      </AttrNames>
    </nodeDefinition>
    </tree>The tree works just fine and list all it should list. I can click the department and my selection listener print the departments name in the console.
    I can expand a department and list all employees. The problems is when I click an employee, I get null pointer exception.
    I have found out that the selectin listener can't find nodeBiding for employees. So nodeBinding.getHierTypeBinding().getStructureDefName(); throw NullpointerException.
    Anyone have an idea of what's wrong? Please help.
    -Thomas
    Edited by: Thomas H on Mar 22, 2010 8:21 AM

    Hi,
    if you open the tree binding editor, it has an entry "Target Data Source" for each of the node levels that you can use and point to an iterator binding representing the node. Not sure if this solves the issue, but chaces are.
    1. create an iterator for a child VO (using the not dependent child VO instance)
    2. Edit Target Data Source for the binding to e.g. ${bindings.EmployeesView1Iterator}
    Frank

  • 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

  • How to create a Child node in Tree object

    Hi All,
    I have a thought to create a tree with a child object, that the child can able to create through by right click the parent tree having the options to create or delete the child objects.Please Suggest me if  there is an possible way.
    Thanks
    Gopinath

    Look at sample programm BCALV_TREE_DEMO,
    and especially at the methods ADD_NODE or  DELETE_SUBTREE of class CL_GUI_ALV_TREE.
    For implementing the context menu, consider event ITEM_CONTEXT_MENU_REQUEST.
    Regards,
    Ulrich

  • Problem with remove a node from a list

    ArrayList<My_node> list = new ArrayList<My_node>(size_of_list);
    My_node is :
    public class My_node {
    public int key;
    public String value;
    public My_node(int x,String y) {
    key = x;
    value = y;
    public void del_(int num,String name) {
    for(j = 0;j<list.size();j++) {
         if(list.get(j).key == num && list.get(j).value == name ) {
    list.remove(j);
    return;
    But unfotrtunately the node is not deleted!!!
    Could you plz tell me where is the problem?
    Thanks in advance!

    The problem might be that you are using == to compare strings. Try to use the .equals method.
    if(list.get(j).key == num && list.get(j).value.equals(name))

Maybe you are looking for

  • RFC Adapter Problem: Necessary Roles?

    Hi XI Gurus, Our team is working with a File-to-RFC scenario. We are using a custom RFC, which uses BAPI_GOODSMVT_CREATE within it, to post data for Goods issue, Goods receipt and Transfer Posting. We are using the credemtials of a user, <b>sapxiuser

  • Firefox 32 - Download file to external application fails to open the application. Only works if app is used within Firefox as in Acrobat reader.

    Some of my users have started using Firefox 32 and discovered that files on the websites (pdf, xls, doc, etc) will not open fully if the application option is set to a windows application such as Acrobat Viewer, Microsoft Excel, Word, etc. The Downlo

  • Decode in a join condition

    Hi all, I stumbled across a very inefficient query in my product. I think the reason is having "decode" in two join conditions. Before I post the query, execution plan etc, and get the tuned sql statement on a platter, I want to fight it myself. :-)

  • Comparing Top-n queries for performance

    I would like to know which version of the query is performance efficient. Query1: Using analytic functions: select * from ( select pv.vendor_name, aia.invoice_num , aia.invoice_date, aia.invoice_amount ,pvs.vendor_site_code,att.name terms *,row_numbe

  • Installing powerbook HDD into an enclosure

    I purchased the Vantec NexStar SX enclosure from Newegg and it's the right interface and size (2.5 IDE) but for some reason my Powerbook HD won't fit into it. There's a weird piece on the board of the enclosure that leaves the back end sticking up. A