1. #1
    Sencha User
    Join Date
    Dec 2010
    Posts
    16
    Vote Rating
    0
    dato.java is on a distinguished road

      0  

    Default Removing Node From TreePanel

    Removing Node From TreePanel


    Hello,
    In my application i use TreePanel to contruct tree and do some actions on it ,but when i try to remove node programatically ,some error occurs on javascript(Firebug shows error: "d is null") ,but it removes from tree and user sees that it is really removed ,i cant understand whats wrong
    here is my code:

    ]MDTNodeModel selectedModel = (MDTNodeModel) mdtPanel.getSelectionModel().getSelectedItem();
    TreeStore<BaseModel> store = (TreeStore<BaseModel>) mdtPanel.getStore();
    List<? extends BaseModel> storeList = store.getAllItems();
    store.remove(selectedModel); //Error occurs here i exactly now that selectedModel object is not null
    //and also store object

  2. #2
    Sencha User
    Join Date
    Nov 2008
    Location
    Vienna - Austria
    Posts
    868
    Vote Rating
    1
    micgala is on a distinguished road

      0  

    Default


    Try executing this in debug mode.
    Add then a NullPointerException breakpoint.

    You will then be able to see where the error is, hopefully.

    Regards,
    Michel.

  3. #3
    Sencha User
    Join Date
    Oct 2012
    Posts
    9
    Vote Rating
    0
    akshayrpin is on a distinguished road

      0  

    Default


    micgala,

    Even i am facing the Same issue when i try to remove a node which is selected it throws error.

    if i iterate all the child's and remove, which are not selected gets removed without any error it fails for the one selected, BTW on the screen the Seleted node gets removed but the Later code written is not executed.

    dato.java were you able to solve the issue.


    could you suggest me how to Reorder the nodes inside a parent using a button not by DND

Similar Threads

  1. TreePanel DND without removing node
    By bjornj in forum Ext GWT: Discussion
    Replies: 4
    Last Post: 22 Feb 2011, 10:40 PM
  2. Need to reload single treepanel node, and treepanel node checkbox error
    By sgdevteam in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 10 Mar 2010, 5:46 PM
  3. Problem in removing a node from tree:deletin alternate node
    By varsha.kothari in forum Ext 2.x: Help & Discussion
    Replies: 6
    Last Post: 14 Apr 2009, 1:13 AM
  4. Help removing a node from a tree
    By bsklar_ca in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 10 Feb 2009, 12:57 PM
  5. Removing Node attributes
    By sz_146 in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 7 Nov 2008, 6:58 AM

Thread Participants: 2