View.js 990 B

1234567891011121314151617181920212223242526272829
  1. MWF.xDesktop.requireApp("process.Xform", "$Module", null, false);
  2. MWF.xDesktop.requireApp("process.Xform", "widget.View", null, false);
  3. MWF.xApplication.process.Xform.View = MWF.APPView = new Class({
  4. Extends: MWF.APP$Module,
  5. _loadUserInterface: function(){
  6. this.node.empty();
  7. //MWF.xDesktop.requireApp("process.Xform", "widget.View", function(){
  8. this.json.application = this.form.json.applicationName;
  9. this.view = new MWF.xApplication.process.Xform.widget.View(this.node, this.json, {
  10. "onSelect": function(){
  11. this.fireEvent("select");
  12. }.bind(this)
  13. });
  14. //}.bind(this), false);
  15. },
  16. getData: function(){
  17. if (this.view.selectedItems.length){
  18. var arr = [];
  19. this.view.selectedItems.each(function(item){
  20. arr.push(item.data);
  21. });
  22. return arr;
  23. }else{
  24. return [];
  25. }
  26. }
  27. });