Results 1 to 3 of 3

Thread: TreeStore node deletion using nodeParam

  1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    36
    Vote Rating
    0
      0  

    Default 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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,551
    Answers
    3931
    Vote Rating
    1271
      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 @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Jul 2012
    Posts
    36
    Vote Rating
    0
      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.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •