Guest User

Untitled

a guest
Jul 16th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.32 KB | None | 0 0
  1. ext-all-debug.js:3713[Ext.Loader] Synchronously loading 'Exercise.controller.Users'; consider adding Ext.require('Exercise.controller.Users') above Ext.onReady
  2. ext-all-debug.js:4757An uncaught error was raised with the following data:
  3. ext-all-debug.js:4758
  4. Object
  5. ext-all-debug.js:4764Ext.Loader is not enabled, so dependencies cannot be resolved dynamically. Missing required class: Exercise.controller.Users
  6. ext-all-debug.js:4771Uncaught Error
  7.  
  8. <html>
  9. <head>
  10. <title></title>
  11. <style>
  12. @import url('libraries/extjs/resources/css/ext-all.css');
  13. </style>
  14. <script src = "libraries/extjs/bootstrap.js"></script>
  15. <!--
  16. <script src = "public/app/controller/Users.js"></script>
  17. -->
  18. <script src = "public/app/app.js"></script>
  19. <script>
  20. </script>
  21. </head>
  22. <body>
  23.  
  24. </body>
  25. </html>
  26.  
  27. Ext.define('Exercise.controller.Users', {
  28. extend: 'Ext.app.Controller',
  29. init: function() {
  30. console.log('Initialized Users! This happens before the Application launch function is called');
  31. }
  32. });
  33.  
  34. Ext.define('Exercise.model.User', {
  35. extend: 'Ext.data.Model',
  36. fields: [{
  37. name: 'id',
  38. type: 'int'
  39. }, {
  40. name: 'created_at',
  41. type: 'date',
  42. dateFormat: 'Y-m-d H:i:s'
  43. }, {
  44. name: 'member_id',
  45. type: 'int'
  46. }, {
  47. name: 'first_name',
  48. type: 'string'
  49. }, {
  50. name: 'last_name',
  51. type: 'string'
  52. }, {
  53. name: 'password',
  54. type: 'string'
  55. }, {
  56. name: 'dob',
  57. type: 'date',
  58. dateFormat: 'Y-m-d'
  59. }, {
  60. name: 'email_address',
  61. type: 'string'
  62. }, {
  63. name: 'is_active',
  64. type: 'int'
  65. }],
  66. proxy: {
  67. type: 'ajax',
  68. format: 'json',
  69. url: '../../_dev/json_fixtures/users.json',
  70. reader: {
  71. type: 'json',
  72. root: 'users'
  73. },
  74. root: 'users'
  75. }
  76. });
  77.  
  78. Exercise.views.user.list = Ext.extend(Ext.grid.Panel, {
  79. store: Exercise.stores.users,
  80. renderTo: Ext.getBody(),
  81. columns:[{
  82. header: 'Member ID',
  83. dataIndex: 'member_id'
  84. }, {
  85. header: 'First Name',
  86. dataIndex: 'first_name'
  87. }, {
  88. header: 'Last Name',
  89. dataIndex: 'last_name'
  90. }],
  91. initComponent: function() {
  92. Exercise.stores.users.load();
  93. Exercise.views.UsersList.superclass.initComponent.apply(this, arguments);
  94. }
  95. });
  96.  
  97. Ext.application({
  98. name: 'Exercise',
  99. autoCreateViewport: true,
  100. appFolder: 'app',
  101.  
  102. controllers: [
  103. 'Users'
  104. ],
  105. launch: function() {
  106. Ext.create('Ext.container.Viewport', {
  107. layout: 'fit',
  108. items: [
  109. {
  110. xtype: 'panel',
  111. title: 'Users',
  112. html : 'List of users will go here'
  113. }
  114. ]
  115. });
  116. }
  117. });
  118.  
  119. Ext.Loader.setConfig({enabled:true});
  120.  
  121. <html>
  122. <head>
  123. <title></title>
  124. <style>
  125. @import url('libraries/extjs/resources/css/ext-all.css');
  126. </style>
  127. <!-- The MVC system needs ext-debug.js, not bootstrap.js -->
  128. <script src = "libraries/extjs/ext-debug.js"></script>
  129. <script src = "public/app/app.js"></script>
  130. <script>
  131. </script>
  132. </head>
  133. <body>
  134.  
  135. </body>
  136. </html>
Add Comment
Please, Sign In to add comment