Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2014
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. Ext.Array.each(records, function(portfolioitem){
  2. if (portfolioitem.get('PortfolioItemTypeName') == "Feature") {
  3. final_features.push(portfolioitem);
  4. //var _childObj = {};
  5. //self._childObj = new Object();
  6. console.log("childOBJ value 1",self._childObj);
  7. self._childObj = portfolioitem;
  8. self._copyChild();
  9. }
  10. }, self);
  11. },
  12. scope: this
  13. });
  14. }, self);
  15. }
  16. }
  17. });
  18. },
  19. scope: this
  20. },
  21. });
  22. },
  23. // Inner Copy functions
  24. _copyChild: function() {
  25. console.log("child value here", that._childObj);
  26. this.innerModelRetrieved();
  27. },
  28. innerModelRetrieved: function() {
  29. var that = this
  30. console.log("next child value here", that._childObj);
  31. that._type = 'PortfolioItem/' + that._childObj.get('PortfolioItemTypeName');
  32. Rally.data.ModelFactory.getModel({
  33. type: that._type,
  34. success: that.onInnerModelRetrieved,
  35. scope: that
  36. });
  37. },
  38. onInnerModelRetrieved: function(model) {
  39. console.log("next child value here", that._childObj);
  40. this.model = model;
  41. this.genericInnerCopy(model);
  42. },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement