Advertisement
Guest User

Untitled

a guest
Mar 30th, 2017
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. {
  2. init:[
  3. '<div id="list"></div>'
  4. ],
  5. data:{
  6. data: [
  7. { idfield:'abc', desc: 'parent1', children: [ { id:'fgh', desc: 'child1' }, { id:'lmn', desc: 'child2' } ] },
  8. { idfield:'def', desc: 'parent2', children: [ { id:'xyz', desc: 'child1' } ] }
  9. ]
  10. },
  11. ui:{
  12. '#list':{
  13. bind:'data',
  14. list:'<div><div id="list2"></div></div>', // list item
  15. id:['idfield'], // field(s) to generate unique row id
  16. check:true, // should the list report errors to parent
  17. manifest:{
  18. // 1st level child manifest
  19. ui:{
  20. '#list2':{
  21. bind:'children',
  22. id:['id'], // field(s) to generate unique row id
  23. list:'<div></div>', // list item
  24. check:true,
  25. manifest:{
  26. //2nd level manifest
  27. }
  28. }
  29. }
  30. }
  31. }
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement