Guest User

Untitled

a guest
Mar 17th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. ConceptPropertiesPanel = function() {
  2.  
  3. this.source = { ***// if i set source this way, it will work***
  4.  
  5. "(name)": "My Object",
  6. "Created": new Date(Date.parse('10/15/2006')),
  7. "Available": false,
  8. "Version": .01,
  9. "Description": "A test object"
  10. };
  11.  
  12. ConceptPropertiesPanel.superclass.constructor.call(this, {
  13. id: 'concetp-properties',
  14. region: 'east',
  15. title: 'Concept Properties',
  16. autoScroll: true,
  17. margins: '0 5 0 0',
  18. split: true,
  19. width: 250,
  20. minSize: 250,
  21. maxSize: 400,
  22. collapsible: true,
  23. source: {}
  24. })
  25.  
  26. setSourceData: function(data) { **//I want to set source when the below method is called, but not working**
  27. this.setSource({
  28. "(name)": "My Object",
  29. "Created": new Date(Date.parse('10/15/2006')),
  30. "Available": false,
  31. "Version": .01,
  32. "Description": "A test object"
  33. });
  34. }
  35.  
  36. });
  37.  
  38. var conceptPropertiesPanel = new ConceptPropertiesPanel();
  39. conceptPropertiesPanel.setSourceData(data);
  40.  
  41. ConceptPropertiesPanel = function(config) {
  42.  
  43. this.source = config || { ***// if i set source this way, it will work***
  44.  
  45. "(name)": "My Object",
  46. "Created": new Date(Date.parse('10/15/2006')),
  47. "Available": false,
  48. "Version": .01,
  49. "Description": "A test object"
Add Comment
Please, Sign In to add comment