1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    33
    Vote Rating
    0
    raminbp is on a distinguished road

      0  

    Default Unanswered: TreeStore node deletion using nodeParam

    Unanswered: TreeStore node deletion using nodeParam


    hi
    here is the problem .
    i have a tree Panel , and it has a Tree Store .
    in the api object of TreeStor , i have four separate Url for create, update, read, destroy
    and finally nodeParam is set .
    when i click on plus sign of any node in tree panel, an http post connection fetchs the data . in this connection nodeParam is set , which i have defined it to be 'ids', so ids = nodeId will be send as node parameter,

    i expect that when i want to delete a record from the tree panel , something similar happens , an http connection with which sends the nodeId of the to ndoe which is supposed to be deleted. but when i remove the node , and sync the store, it act in a different way . it attaches a json object based on the store's model, and there is no nodeParam attached to it .

    why is that ? maybe it is logical but i need to know why ?

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,125
    Answers
    3504
    Vote Rating
    855
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Set a breakpoint on the sync call. Are you specifying a writer? You can change the behavior by extending a write. The json object is probably the data on the node
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Jul 2012
    Posts
    33
    Vote Rating
    0
    raminbp is on a distinguished road

      0  

    Default


    thanks for your answer .

    maybe i'm wrong but i think the problem has nothing to do with writer object , and i tell why. as i tested you can use writer when u are dealing with a JSON attached to your connection , how to format it and these stuffs.

    i finally made the destroy to act like read. if you use
    Code:
     actionMethod : {
             destroy : 'GET'
    }
    in your proxy.
    BUT still there is 1 problem , and it is , how to set nodeParam for this Get connection. or generally how it is possible to set a parameter for the connection when the proxy deletes a record.

Thread Participants: 1

Tags for this Thread