Trying to add a node in a TreeByNestingTableColumn

Hello All,
I'm still having problems doing this!
I followed the tutorial step by step on how to Integrate a Tree structure in Web Dynpro table.
I'm using NWDS 7.0.18 on EP 7.0
The tutorial can be found [here|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/de59f7c2-0401-0010-f08d-8659cef543ce]
I changed mine around a little bit to use Levels.java instead of Catalog.java.
I got it working fine. Now the next step I want to do is add a toolbar button that will add a node in the tree structure. So I created the relevant button with an action onActionInsertNode and its signature its the same as the signature for Loading children nodes
public void onActionInsertNode(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent,
com.sjm.wdp.wdp.IPrivateTreeAppCompView.ILEVELElement element )
    //@@begin onActionInsertNode(ServerEvent)
    addNewLevel(element.nodeCHILD_LEVEL(), element.getID()); // Null pointer exception here
    //@@end
I created a new method called addNewLevel to add a single element which is the new node. It looks like this
public void addNewLevel( com.sjm.wdp.wdp.IPrivateTreeAppCompView.ILEVELNode node,
java.lang.String parentId )
    //@@begin addNewLevel()
     IPrivateTreeAppCompView.ILEVELElement newLevelElement;
     if(parentId.equals(Levels.getParentId(node.LEAD_SELECTION)))
          newLevelElement = wdContext.nodeLEVEL().createLEVELElement();
          node.addElement(newLevelElement);
    //@@end
Now when I click the Insert Node button, I want to insert a new node underneath the selected node, ie I want to make it the child of the selected node. node.LEAD_SELECTION. If I look at my code it seems as if I'm following the same logic as the code provided by the tutorial, except the tutorial loops thru the multidimensional array in the Java file and I'm just trying to add a single child node.
I get a null pointer exception when the onActionInsertNode fires, Ive indicated above where.
Can someone kindly please explain what I am doing wrong?
Thanks in advance.
PS. I forgot to mention that when I created my action onActionInsertNode, I did NOT check the without validation checkbox. I don't actually know what this checkbox does, but in the tutorial is asks you to check this box when you create onActionLoadChildren.

Hi Armin,
So using what you have given me so far here is how the getTreeSelection().index() is returning
context                      getTreeSelection().index()
-Root                                       -1   
  - child1                                   0
    - gchild1_1                            0
      - leaf1_1                             0
      - leaf1_2                             1
    - gchild1_2                            1
    - gchild1_3                            2
  - child2                                   1
    - gchild2_1                            0
    - gchild2_2                            1
Here is my code to add a node into the desired position in the tree.
public void onActionInsertNode(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent,
com.sjm.wdp.wdp.IPrivateTreeAppCompView.ILEVELElement element )
    //@@begin onActionInsertNode(ServerEvent)
    //addNewLevel(element.nodeCHILD_LEVEL(), element.getID());
    if(wdContext.nodeLEVEL().getLeadSelection() != IWDNode.NO_SELECTION)
         try
          IPrivateTreeAppCompView.ILEVELElement newChildElem =
                                                 wdContext.createLEVELElement();
          wdContext.nodeLEVEL().addElement
                               (wdContext.nodeLEVEL().getTreeSelection().index(), newChildElem);
     catch(Exception e)
    //@@end
However, despite specifying where to add the node, the node keeps getting created and added at the root level. Please help out.
Marshall.

Similar Messages

  • Trying to add a new node to OAS

    I'm trying to add a new node to our OAS server, and it always fails. Any hints on what I might be doing wrong?

    every entry in an ldap directory must have some mandatory attributes, e.g. "objectClass". which objectclass your entry should belong to? add the objectClass-attribute to your entry!
    Regards!
    Rainer

  • [SOLVED] Can't add a node to the cluster with error (Exchange 2010 SP3 DAG Windows Server 2012)

    Hi there!
    I have a problem which makes me very angry already :)
    I have two servers Exchange 2010 SP3 with MB role started on Windows Server 2012. I decided to create a DAG.
    I have created the prestaged AD object for the cluster called msc-co-exc-01c, assigned necessary permissions and disabled it. Allowed through the Windows Firewall traffic between nodes and prepared the File Share Witness server.
    Then I have tried to add nodes. The first node has been added successfully, but the second node doesn't want to be added :). Now I can add only one node to the DAG. I tried to add different servers first, but only the first one was added.
    LOGS on the second nodes: 
    Application Log
    "Failed to initialize cluster with error 0x80004005." (MSExchangeIS)
    Failover Clustering Diagnostic Log
    "[VER] Could not read version data from database for node msc-co-exc-04v (id 1)."
    CMDLET Error:
    Summary: 1 item(s). 0 succeeded, 1 failed.
    Elapsed time: 00:06:21
    MSC-CO-EXC-02V
    Failed
    Error:
    A database availability group administrative operation failed. Error: The operation failed. CreateCluster errors may result from incorrectly configured static addresses. Error: An error occurred while attempting a cluster operation. Error: Cluster API '"AddClusterNode()
    (MaxPercentage=100) failed with 0x5b4. Error: This operation returned because the timeout period expired"' failed. [Server: msc-co-exc-04v.int.krls.ru]
    An Active Manager operation failed. Error An error occurred while attempting a cluster operation. Error: Cluster API '"AddClusterNode() (MaxPercentage=100) failed with 0x5b4. Error: This operation returned because the timeout period expired"' failed..
    This operation returned because the timeout period expired
    Click here for help... http://technet.microsoft.com/en-US/library/ms.exch.err.default(EXCHG.141).aspx?v=14.3.174.1&t=exchgf1&e=ms.exch.err.ExC9C315
    Warning:
    Network name 'msc-co-exc-01c' is not online. Please check that the IP address configuration for the database availability group is correct.
    Warning:
    The operation wasn't successful because an error was encountered. You may find more details in log file "C:\ExchangeSetupLogs\DagTasks\dagtask_2014-11-17_13-54-56.543_add-databaseavailabiltygroupserver.log".
    Exchange Management Shell command attempted:
    Add-DatabaseAvailabilityGroupServer -MailboxServer 'MSC-CO-EXC-02V' -Identity 'msc-co-exc-01c'
    Elapsed Time: 00:06:21
    UPD:
    when Exchange servers ran on the same Hyper-V node, the DAG is working well, but if I move one of VM to another node, It stops working.
    I have installed Wireshark and captured trafic of cluster interface. When DAG members on the same HV-node, there is inbound and outbound traffic on the cluster interface, but if I move one of DAG member to another node, in Wireshark I see only outbound traffic
    on both nodes.
    It's confused me, because there is normal connectivity between these DAG members through the main interface.
    Please, help me if you can.

    Hi, Jared! Thank you for the reply.
    Of course I did it already :) I have new info:
    when Exchange servers ran on the same Hyper-V node, the DAG is working well, but if I move one of VM to another node, It stops working.
    I have installed Wireshark and captured trafic of cluster interface. When DAG members on the same HV-node, there is inbound and outbound traffic on the cluster interface, but if I move one of DAG member to another node, in Wireshark I see only outbound traffic
    on both nodes.
    It's confused me, because there is normal connectivity between these DAG members through the main interface.

  • Add tree node problem

    Hi guys, I'm trying to add nodes programatically but I have the same wrong behavior:
    1. I displayed a tree which will be updated from a data block and Selected say NODE1.
    2. After I displayed it I EXECUTE QUERY on the DATA BLOCK next to it, so I can choose a candidate record to belong to the tree structure.
    3. I add the record via a button which has the addMyNode code.
    4. It adds the node correctly. (say NODE11).
    5. I add another node just behind the new node (NODE11) say NODE 111.
    6. With my mouse I selected the father(NODE1) of NODE11 and add a brother of NODE 11, say NODE12, but this node is added next to NODE111.
    7. If I navigate a little while through the tree after step number 5, and then return to NODE1 with my mouse, I can add it perfectly.
    What's wrong with my code:??
    AddMyNode (in a PushButton):
    PROCEDURE AddMyNode IS
    htree ITEM;
    top_node FTREE.NODE;
    new_node FTREE.NODE;
    item_value VARCHAR2(120);
    num_selected NUMBER;
    current_node FTREE.NODE;
    ncl_centro      NUMBER;
    BEGIN
    htree := Find_Item('DB_ARBOL.HT_ARBOL');
    num_selected := Ftree.Get_Tree_Property(htree, Ftree.SELECTION_COUNT);
    FOR j IN 1..num_selected LOOP
    current_node := Ftree.Get_Tree_Selection(htree, j); Long postings are being truncated to ~1 kB at this time.

    Hi guys, I'm trying to add nodes programatically but I have the same wrong behavior:
    1. I displayed a tree which will be updated from a data block and Selected say NODE1.
    2. After I displayed it I EXECUTE QUERY on the DATA BLOCK next to it, so I can choose a candidate record to belong to the tree structure.
    3. I add the record via a button which has the addMyNode code.
    4. It adds the node correctly. (say NODE11).
    5. I add another node just behind the new node (NODE11) say NODE 111.
    6. With my mouse I selected the father(NODE1) of NODE11 and add a brother of NODE 11, say NODE12, but this node is added next to NODE111.
    7. If I navigate a little while through the tree after step number 5, and then return to NODE1 with my mouse, I can add it perfectly.
    What's wrong with my code:??
    AddMyNode (in a PushButton):
    PROCEDURE AddMyNode IS
    htree ITEM;
    top_node FTREE.NODE;
    new_node FTREE.NODE;
    item_value VARCHAR2(120);
    num_selected NUMBER;
    current_node FTREE.NODE;
    ncl_centro      NUMBER;
    BEGIN
    htree := Find_Item('DB_ARBOL.HT_ARBOL');
    num_selected := Ftree.Get_Tree_Property(htree, Ftree.SELECTION_COUNT);
    FOR j IN 1..num_selected LOOP
    current_node := Ftree.Get_Tree_Selection(htree, j); Long postings are being truncated to ~1 kB at this time.

  • Error When Trying To Add Web Clipping

    Receiving the following error in the Apache error log when trying to add a webClipping portlet:
    [Sun Feb  1 08:17:25 2004] [info] [client 141.146.192.68] MOD_OC4J_0007: Oc4j process unique id:
    C_130.35.162.13.11a3ac.f52e368ff8.-8000#titsto_iasmt.auohsitst03.oracleoutsourcing.com#391727#OC4J_Portal#OC4J_Portal#default_island parsed from cookie of session request: /portalTools/webClipping/htdocs/wcstudio/jsp/toolbar.jsp does not match to oc4j instance with destination name: OC4J_Portal. Ignore this cookie.
    The error "WCS-102" shows up on the web - page while trying to add a webClipping portet.
    We have installed JPDK 9.0.2.6.2 over 9.0.2.6.1 and redeployed jpdk and portalTools. Note that the middle tier is a two node RAC.

    Sorry to resurrect this old topic - but was a solution found for this? I'm having the same problem.

  • Trying to add a Wireless router as a switch on an existing Wired network

    Hi,
    I'm having a lot of trouble with my WRT54GS v.2.0
    I'm trying to add wireless access to my existing network here at work. I think the main network is using Dlink 40+ node switches.
    I've been reading around and I've tried to turn off DHCP on the router, but when my computer tries to find a connection, it times out. I'm not even trying to get the wireless to work, just LAN for now.
    The router will get an ip address assigned by the main network, so it's connected, but I can't get the computer through to the main network.
    Is there anything I need to be setting up on the computer? Can this even be done?
    Thanks,
    Alex

    please make sure that you dont use the internet port on the router, use the local ports...(1,2,3,4)

  • Add the node # to the hierarchy

    Hello,
    I would like to add the unassigned node (it appears as value #  ) to the cost center hierarchy. If I add the value '# ' to the hierarchy in R3 , the extraction fails because # is not allowed. I tried to add # to the "permitted extra characters" but still the extraction fails. I can add this node manually after the extraction finishes but its not practical because we extract this hierarchy every day. Is it possible to add the unassigned node automatic?
    Thank you,
    Amir

    Amir,
    Once the hierarchy is loaded - click on Hierarchy properties and deselect "Suppress Unassigned nodes"
    Arun

  • Letting a user add a node to a tree

    Hi,
    Currently I have a tree that is built dynamically with a
    remote object call. Also, if the user clicks on a node, a menu pops
    up allowing the user to create a child for the node. How do I let
    the user add a node to the tree ? I saw tangential examples showing
    how to add xml nodes, but I am unable to translate that to trees
    that are populated NOT in static xml, but from a remote object
    call.
    I have the following function signature :
    // parentIndex - the index of the parent node, where the user
    wants to add a child node
    // childLabel - the label for the child node.
    private addChild(parentIndex:int, childLabel:String) {
    Thanks for your help.

    Hi Tracy, this the code I am using from PeterEnt's blog. His
    example was about drag-and-drop. I am trying to use it (maybe I
    shouldn't:) for my child node insertion.
    myTree.selectedIndex = parentIndex;
    var node:XML = myTree.selectedItem as XML; // interestingly,
    myTree.selectedItem is not null, but node is null. Why ?
    var p:*;
    if(myTree.dataDescriptor.hasChildren(node)) {
    p = node;
    parentIndex = 0;
    else { // I am getting a null pointer exception here
    p = node.parent();
    var insert:XML = <node />;
    insert.@label = "New Toy";
    insert.@type = "Toy";
    myTree.dataDescriptor.addChildAt(p, insert, parentIndex+1);
    I am getting the parent value (label etc) correctly for
    myTree.selectedItem. But when I do node:XML = myTree.selectedItem
    as XML, I am getting null value for null. That's why I asked in my
    first message if there is a difference in populating the data
    statically as XML v.s. loading the data using remote object (which
    is the case here).
    Appreciate your help.

  • Add New Node - Adobe Director Microsoft Treeview Control 6.0 xtra?

    Can some one help me on how to add new node to TreeView Control provided as xtra with Adobe Director. Tried using sprite(1).Nodes.Add but not working. Please assist

    Right, I am accessing the control via Insert  ->Controls -> ActiveX -> Microsoft Treeview. (unable to find any documentation)
    I am actually trying to make a treeview and on selection do some stuff.
    I have tried using CxtraPopup to create the same but when publishing it says unregistered version.
    Can you please suggest any xtra that supports Menu.
    Thanks

  • Error while trying to add an internal leaf

    Hi Experts,
    I am facing a problem while trying to add an internal leaf to an inner node in a hierarchy table.
    Whenever I am trying to do so , I am getting an error message that
    'One or more records failed a validation'.
    I am not getting any clue why this is happening. Can any one provide me some idea to solve this problem?
    Thanks,
    Samrat

    Hi SAMRAT,
    'One or more records failed a validation' - This statement points out that there is an MDM validation failure in the records.
    You need to check for any validations for the Hierarchy table or the Hierarchy lookup filed in the Main table.
    There should be a Validation that is running on the Hierarchy value/Node and preventing you from creating a node.
    Setting the validation as None will not execute the validation on its on .
    Hope It Helped
    Thanks & Regards
    Simona Pinto

  • Not able to add a node ...

    I have a host sun m/c with Agent statistic and Agent Update LOADED.
    I am using "Halcyon PrimeAlert (R) Agent for Windows- Version 5.1.1" on one of the windows machine and trying to add this windows node in SMC. When i do this, SMC flashes the following error message " Cannot find agent process. please check host/port."
    Please help me to add this node in SMC.
    Regards,
    -Aj

    Hi Aj,
    I have a host sun m/c with Agent statistic and
    Agent Update LOADED.
    I am using "Halcyon PrimeAlert (R) Agent for
    Windows- Version 5.1.1" on one of the windows
    machine and trying to add this windows node in
    SMC. When i do this, SMC flashes the following error
    message " Cannot find agent process. please check
    host/port."
    What steps did you perform to try to make an icon for that Agent? In SyMON 2.x, you click "Edit -> Create Icon -> Sun Management Center Agent - Host". For SunMC 3.x you click "Edit -> Create Icon -> Sun Management Center Agent - SNMP Ping" (then change it to a proper Agent icon later):
    http://www.halcyoninc.com/products/NTAgent/docs/README.html
    If that doesn't work it's likely a seeding/security issue. Send an email to [email protected] and they'll be glad to help you get things running.
    Regards,
    [email protected]
    http://www.HalcyonInc.com

  • Trying to add database 9i to cluster 11.2.0.1 gives errors

    Hello,
    Versions:
    S.O: Solaris SPARC 64bit
    database: 9.2.0.8
    cluster: 11.2.0.1
    I am trying to add and start a database 9.2.0.8 to a cluster 11.2.0.1.
    The add database works fine: srvctl add database -d orcl -o /u01/app/oracle/product/9.2.0/dbhome_5 -p '/u01/app/oracle/product/9.2.0/dbhome_5/dbs/spfileorcl.ora';
    The add instance also: srvctl add instance -d orcl -i orcl1 -n node1
    But when I try to start the instance with srvctl start instance -d orcl -i oracl1 I get the following errors:
    PRCR-1013 : Failed to start resource ora.orcl.db
    PRCR-1064 : Failed to start resource ora.orc.db on node node1
    CRS-5011: Check of resource "orcl" failed: details at "(:CLSN00007:)" in "/u01/app/11.2.0/grid/log/node1/agent/crsd/oraagent_oracle/oraagent_oracle.log"
    CRS-2674: Start of 'ora.orcl.db' on 'node1' failed
    GIM-00090: OS-dependent operation:open failed with status: 2
    GIM-00091: OS failure message: No such file or directory
    GIM-00092: OS failure occurred at: sskgmsmr_7
    the log says:
    2011-08-20 17:20:34.810: [    AGFW][11] Command: start for resource: ora.orcl.db 1 1 completed with status: SUCCESS
    2011-08-20 17:20:34.811: [    AGFW][7] Executing command: check for resource: ora.orcl.db 1 1
    2011-08-20 17:20:34.811: [ora.orcl.db][7] [check] Gimh::check OH /u01/app/oracle/product/9.2.0/dbhome_5 SID orcl1
    2011-08-20 17:20:34.812: [    AGFW][9] Agent sending reply for: RESOURCE_START[ora.orcl.db 1 1] ID 4098:924247
    2011-08-20 17:20:34.813: [ora.orcl.db][7] [check] GIMH: GIM-00104: Health check failed to connect to instance
    GIM-00090: OS-dependent operation:open failed with status: 2
    GIM-00091: OS failure message: No such file or directory
    GIM-00092: OS failure occurred at: sskgmsmr_7
    2011-08-20 17:20:34.813: [ora.orcl.db][7] [check] (:CLSN00007:)DbAgent::check failed gimh state 0
    2011-08-20 17:20:34.813: [ora.orcl.db][7] [check] Exception type=2 string=CRS-5011: Check of resource "orcl"
    failed: details at "(:CLSN00007:)" in "/u01/app/11.2.0/grid/log/vettel/agent/crsd/oraagent_oracle/oraagent_oracle.log"
    2011-08-20 17:20:34.814: [    AGFW][9] Agent sending reply for: RESOURCE_START[ora.orcl.db 1 1] ID 4098:924247
    2011-08-20 17:20:34.814: [    AGFW][7] check for resource: ora.orcl.db 1 1 completed with status: FAILED
    2011-08-20 17:20:34.815: [    AGFW][9] ora.orcl.db 1 1 state changed from: STARTING to: FAILED
    2011-08-20 17:20:34.815: [    AGFW][7] Executing command: res_attr_modified for resource: ora.orcl.db 1 1
    2011-08-20 17:20:34.815: [    AGFW][9] Agent sending last reply for: RESOURCE_START[ora.orcl.db 1 1] ID 4098:924247
    2011-08-20 17:20:34.816: [ora.orcl.db][7] [res_attr_modified] clsn_agent::modify {
    2011-08-20 17:20:34.816: [ora.orcl.db][7] [res_attr_modified] clsn_agent::modify }
    2011-08-20 17:20:34.816: [    AGFW][7] Command: res_attr_modified for resource: ora.orcl.db 1 1 completed with status: SUCCESS
    2011-08-20 17:20:34.816: [    AGFW][9] config version updated to : 150 for ora.orcl.db 1 1
    2011-08-20 17:20:34.816: [    AGFW][9] Agent sending last reply for: RESOURCE_MODIFY_ATTR[ora.orcl.db 1 1] ID 4355:924252
    2011-08-20 17:20:35.829: [    AGFW][9] Agent received the message: RESOURCE_CLEAN[ora.orcl.db 1 1] ID 4100:924293
    2011-08-20 17:20:35.829: [    AGFW][9] Preparing CLEAN command for: ora.orcl.db 1 1
    2011-08-20 17:20:35.829: [    AGFW][9] ora.orcl.db 1 1 state changed from: FAILED to: CLEANING
    2011-08-20 17:20:35.830: [    AGFW][7] Executing command: clean for resource: ora.orcl.db 1 1
    output from srvctl config database -d orcl -a
    Database unique name: orcl
    Database name:
    Oracle home: /u01/app/oracle/product/9.2.0/dbhome_5
    Oracle user: oracle
    Spfile: /u01/app/oracle/product/9.2.0/dbhome_5/dbs/spfileorcl.ora
    Domain:
    Start options: open
    Stop options: immediate
    Database role: PRIMARY
    Management policy: AUTOMATIC
    Server pools: orcl
    Database instances: orcl1
    Disk Groups:
    Services:
    Database is enabled
    Database is administrator managed
    I tried to find a health check file for this database but none exists.
    Can someone help me out? what file is it trying to find to give this error? "No such file or directory". How can I solve this issue?
    Thank you.
    Edited by: cibernauta on Aug 20, 2011 10:05 PM

    Hello,
    Then why to they say for example here the following:
    The Oracle GSD (Global Service Daemon) process, ora.gsd, is typically offline. You must enable Oracle GSD manually if you plan to use an Oracle 9i Real Application Clusters database on the Oracle Clusterware 11g release 2 (11.2) cluster.
    ???

  • To Add a Node in Tree?

    Hi,
    I am using the class cl_gui_alv_tree_simple, I need to add a node after tree displayed in the screen?
    I tried to use method TREE_ADD_NODE , but this found protected.
    Thanks
    aRs

    Hi,
    You can use  this method
    DATA  obj_tree1  TYPE REF TO cl_gui_alv_tree.
      CALL METHOD obj_tree1->add_node
        EXPORTING
          i_relat_node_key = p_relat_key
          i_relationship   = cl_gui_column_tree=>relat_last_child
          i_node_text      = l_node_text
          is_outtab_line   = rs_main
          it_item_layout   = lt_item_layout
        IMPORTING
          e_new_node_key   = p_node_key.
    Hope this will solve your problem.
    Award points if it helps.
    -Gaurang

  • I'm trying to add a playlist manually to my iPhone 4. It won't let me because it's trying to delete all of the music currently on my iPhone. Is there any way to prevent this from happening in order to start manually updating it?

    I'm trying to add a playlist manually to my iPhone 4. It won't let me because it's trying to delete all of the music currently on my iPhone. Is there any way to prevent this from happening in order to start manually updating it?

    Are you leaving the box unchecked to Manually manage music & videos? You don't need to to add anything to the iPhone.
    Simply drag the playlist to the iPhone to manually add it.

  • I am trying to add music on my Iphone 4S without deleting my current music list

    I am trying to add music on my Iphone 4S without deleting my current music list

    See this user tip: Recovering your iTunes library from your iPod or iOS device.
    tt2

Maybe you are looking for

  • ICloud and Outlook 2010: "Your setup couldn't be started because of an unexpected error". Any ideas?

    Hi, It looks like iCloud has a problem with Outlook 2010 - when syncing calendars. I repeatedly get the rather vague error message above when I launch the set-up, then the iCloud control panel hangs. If I wait long enough I get "The operation could n

  • How to find out the selection screen values

    Hi All, in BI we are having the maximum allowed cells as 500000 for a report. for some of the reports execution fetching the data morethan 500000 by different users. i could findout the report and user who has executed, But i wanted to findout for wh

  • Oracle Metrics Load Balancing

    I am trying to research the method of load balancing using Oracle Metrics Server/client. Does anyone know of any useful resources ...I am looking for something which can give a brief overview of how this works and what is required plus also something

  • Goods receipt wizard

    Hello experts, i have to enable user to make an alternative goods receipt data entry using a custom form. the above UDF have to use SAP B1 system tables: OPDN and PDN1. what's the best way to achieve it ? Thank's in advance. Best regards Andrea

  • Mailing status in RSPCM

    Hello In RSPCM i configured Mail and maintained mail id in the recipent list. I scheduled it daily and it sends the status information regarding the process chain. Even if there is no error in the process chain it sends a blank mail. But i need mail