0

I am trying to implement a feature in my dojo tree which will allow me to create a folder manually under any folder of the dijit tree hierarchy. On right click on any folder in tree --> Add a new folder(prompt) shows up --> a new folder name is entered and clicked ok should create a new folder under that folder. I tried to implement it in the below way but it is not working*(CODE 1)* for the tree structure generated. Not sure where I am making a mistake. I also tried to create an individual module to create a folder under a tree and it is working.*(CODE 2)* Strange fact, I have added my code as below, please suggest how can I rectify this issue.

I am also fine even if I have to use dojo 1.9.1 for additional functionality. But at the moment I am not able to get the reason for which my code isnt creating a new folder, it is only opening the folder prompt but it is not putting any items created to the store.

Dojo_user
  • 281
  • 4
  • 9
  • 28
  • Where exactly is your code breaking? – Bucket Oct 09 '13 at 13:50
  • Hi Desertlvy, The code is breaking while executing myFunction(store,item) defined in my code and is breaking at the point store.put(childItem, {overwrite: true});. very strange indeed It is returning "undefined" as value. I checked in IE debugger tool as well it shows the same result.It returns this as the error message "'undefined' is null or not an object" in debugger console. – Dojo_user Oct 10 '13 at 04:57
  • What object is `undefined`? `item`? `childItem`? `store`? – Bucket Oct 10 '13 at 15:53
  • Store object is undefined. I created a button"add folder" which is working upon selection of folder in tree & onclick of button it creates folder manually in tree.How can I invoke the same function used in button from my tree menuitem"Add folder"? Here is button code: – Dojo_user Oct 11 '13 at 09:11

0 Answers0